MCPcopy Create free account
hub / github.com/comaps/comaps / UNIT_TEST

Function UNIT_TEST

libs/base/base_tests/math_test.cpp:48–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46} // namespace
47
48UNIT_TEST(round_lround_smoke)
49{
50 TEST_EQUAL(std::round(0.4), 0.0, ());
51 TEST_EQUAL(std::round(0.6), 1.0, ());
52 TEST_EQUAL(std::round(-0.4), 0.0, ());
53 TEST_EQUAL(std::round(-0.6), -1.0, ());
54
55 TEST_EQUAL(std::lround(0.4), 0l, ());
56 TEST_EQUAL(std::lround(0.6), 1l, ());
57 TEST_EQUAL(std::lround(-0.4), 0l, ());
58 TEST_EQUAL(std::lround(-0.6), -1l, ());
59}
60
61UNIT_TEST(PowUInt)
62{

Callers

nothing calls this directly

Calls 13

PowUintFunction · 0.85
TESTFunction · 0.85
AlmostEqualRelFunction · 0.85
NextFloatFunction · 0.85
GCDFunction · 0.85
LCMFunction · 0.85
SignFunction · 0.85
is_finiteFunction · 0.85
NanFunction · 0.85
InfinityFunction · 0.85
AlmostEqualULPsFunction · 0.50
AlmostEqualAbsFunction · 0.50

Tested by

no test coverage detected