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

Function checkObjectPretty

extras/tests/JsonSerializer/JsonObjectPretty.cpp:9–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <string>
8
9static void checkObjectPretty(const JsonObject obj,
10 const std::string expected) {
11 char json[256];
12
13 size_t actualLen = serializeJsonPretty(obj, json);
14 size_t measuredLen = measureJsonPretty(obj);
15
16 REQUIRE(json == expected);
17 REQUIRE(expected.size() == actualLen);
18 REQUIRE(expected.size() == measuredLen);
19}
20
21TEST_CASE("serializeJsonPretty(JsonObject)") {
22 JsonDocument doc;

Callers 1

Calls 2

measureJsonPrettyFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected