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

Function check

extras/tests/TextFormatter/writeFloat.cpp:17–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16template <typename TFloat>
17void check(TFloat input, const std::string& expected) {
18 std::string output;
19 Writer<std::string> sb(output);
20 TextFormatter<Writer<std::string>> writer(sb);
21 writer.writeFloat(input);
22 REQUIRE(writer.bytesWritten() == output.size());
23 CHECK(expected == output);
24}
25
26TEST_CASE("TextFormatter::writeFloat(double)") {
27 SECTION("Pi") {

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected