Debian Codegraph @

Help/guide/tutorial/Complete/TutorialProject/Tests/TestMathFunctions.cxx

raw
1 #include <MathFunctions.h>
2 #include <SimpleTest.h>
3
4 TEST("add")
5 {
6 REQUIRE(mathfunctions::OpAdd(2.0, 2.0) == 4.0);
7 }
8
9 TEST("sub")
10 {
11 REQUIRE(mathfunctions::OpSub(4.0, 2.0) == 2.0);
12 }
13
14 TEST("mul")
15 {
16 REQUIRE(mathfunctions::OpMul(5.0, 5.0) == 25.0);
17 }
18
19 TEST("sqrt")
20 {
21 REQUIRE(mathfunctions::sqrt(25.0) == 5.0);
22 }