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

Function checkFloatInf

extras/tests/Numbers/parseFloat.cpp:26–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

parseFloat.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected