MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / toString

Method toString

test/testmathlib.cpp:1503–1513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1501 }
1502
1503 void toString() const {
1504 ASSERT_EQUALS("0.0", MathLib::toString(0.0));
1505 ASSERT_EQUALS("0.0", MathLib::toString(+0.0));
1506 ASSERT_EQUALS("0.0", MathLib::toString(-0.0));
1507
1508 ASSERT_EQUALS("1e-08", MathLib::toString(0.00000001));
1509 ASSERT_EQUALS("-1e-08", MathLib::toString(-0.00000001));
1510
1511 ASSERT_EQUALS("2.22507385851e-308", MathLib::toString(std::numeric_limits<double>::min()));
1512 ASSERT_EQUALS("1.79769313486e+308", MathLib::toString(std::numeric_limits<double>::max()));
1513 }
1514};
1515
1516REGISTER_TEST(TestMathLib)

Callers

nothing calls this directly

Calls 1

toStringFunction · 0.50

Tested by

no test coverage detected