summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Step11/TutorialProject/Tests/TestMathFunctions.cxx
blob: 166fd5d230b72e3c71dde81686e2382b31ce6bd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <MathFunctions.h>
#include <SimpleTest.h>

TEST("add")
{
  REQUIRE(mathfunctions::OpAdd(2.0, 2.0) == 4.0);
}

TEST("sub")
{
  REQUIRE(mathfunctions::OpSub(4.0, 2.0) == 2.0);
}

TEST("mul")
{
  REQUIRE(mathfunctions::OpMul(5.0, 5.0) == 25.0);
}

TEST("sqrt")
{
  REQUIRE(mathfunctions::sqrt(25.0) == 5.0);
}