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

Function checkFloat

extras/tests/Numbers/parseFloat.cpp:13–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11using namespace ArduinoJson::detail;
12
13void checkFloat(const char* input, float expected) {
14 CAPTURE(input);
15 auto result = parseNumber(input);
16 REQUIRE(result.type() == NumberType::Float);
17 REQUIRE(result.asFloat() == Approx(expected));
18}
19
20void checkFloatNaN(const char* input) {
21 CAPTURE(input);

Callers 1

parseFloat.cppFile · 0.70

Calls 4

parseNumberFunction · 0.85
ApproxFunction · 0.50
typeMethod · 0.45
asFloatMethod · 0.45

Tested by

no test coverage detected