MCPcopy Create free account
hub / github.com/BIMCoderLiang/LNLib / TEST

Function TEST

tests/T_MathUtils.cpp:5–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3using namespace LNLib;
4
5TEST(Test_MathUtils, Compare)
6{
7 double a = -10;
8 EXPECT_FALSE(MathUtils::IsAlmostEqualTo(a, 0.0));
9 EXPECT_TRUE(MathUtils::IsLessThanOrEqual(a, Constants::DoubleEpsilon));
10 EXPECT_TRUE(MathUtils::IsAlmostEqualTo(a, a + Constants::DoubleEpsilon));
11 EXPECT_TRUE(MathUtils::IsGreaterThanOrEqual(a, a + Constants::DoubleEpsilon));
12 EXPECT_TRUE(MathUtils::IsLessThanOrEqual(a, a + Constants::DoubleEpsilon));
13 EXPECT_TRUE(MathUtils::IsGreaterThan(a, -20));
14 EXPECT_TRUE(MathUtils::IsLessThan(a, 0));
15}
16
17TEST(Test_MathUtils, Binomial)
18{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected