Debian Codegraph @

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

raw
1 #include <MathFunctions.h>
2
3 // TODO5: Replace the following 5 lines with #include <SimpleTest.h>
4 #define TEST(x) namespace
5 #define REQUIRE(x)
6 int main()
7 {
8 }
9
10 TEST("add")
11 {
12 REQUIRE(mathfunctions::OpAdd(2.0, 2.0) == 4.0);
13 }
14
15 TEST("sub")
16 {
17 REQUIRE(mathfunctions::OpSub(4.0, 2.0) == 2.0);
18 }
19
20 TEST("mul")
21 {
22 REQUIRE(mathfunctions::OpMul(5.0, 5.0) == 25.0);
23 }
24
25 TEST("sqrt")
26 {
27 REQUIRE(mathfunctions::sqrt(25.0) == 5.0);
28 }