MCPcopy Create free account
hub / github.com/bblanchon/ArduinoJson / checkDoubleInf

Function checkDoubleInf

extras/tests/Numbers/parseDouble.cpp:25–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25void checkDoubleInf(const char* input, bool negative) {
26 CAPTURE(input);
27 double x = parseNumber<double>(input);
28 if (negative)
29 REQUIRE(x < 0);
30 else
31 REQUIRE(x > 0);
32 REQUIRE(x == x); // not a NaN
33 REQUIRE(x * 2 == x); // a property of infinity
34}
35
36TEST_CASE("parseNumber<double>()") {
37 SECTION("Short_NoExponent") {

Callers 1

parseDouble.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected