DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
test_Scalar.cpp File Reference

Unit tests for BisectSolveLower in Solver/Scalar.hpp. More...

#include "doctest.h"
#include "Solver/Scalar.hpp"
#include <cmath>
Include dependency graph for test_Scalar.cpp:

Go to the source code of this file.

Macros

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
 

Functions

 TEST_CASE ("BisectSolveLower: x^2 = 4 => x = 2")
 
 CHECK (v==doctest::Approx(expected).epsilon(1e-10))
 
 TEST_CASE ("BisectSolveLower: few iterations gives lower accuracy")
 

Variables

double v = Scalar::BisectSolveLower(F, 0.0, 1.5, 0.5, 100)
 
double expected = std::asin(0.5)
 

Detailed Description

Unit tests for BisectSolveLower in Solver/Scalar.hpp.

Definition in file test_Scalar.cpp.

Macro Definition Documentation

◆ DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

Definition at line 6 of file test_Scalar.cpp.

Function Documentation

◆ CHECK()

CHECK ( v  = =doctest::Approx(expected).epsilon(1e-10))
Here is the caller graph for this function:

◆ TEST_CASE() [1/2]

TEST_CASE ( "BisectSolveLower: few iterations gives lower accuracy"  )

Definition at line 44 of file test_Scalar.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [2/2]

TEST_CASE ( "BisectSolveLower: x 2 = 4 =)

Definition at line 15 of file test_Scalar.cpp.

Here is the call graph for this function:

Variable Documentation

◆ expected

double expected = std::asin(0.5)

Definition at line 26 of file test_Scalar.cpp.

◆ v

double v = Scalar::BisectSolveLower(F, 0.0, 1.5, 0.5, 100)

Definition at line 25 of file test_Scalar.cpp.