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

Function check

extras/tests/TextFormatter/writeString.cpp:12–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using namespace ArduinoJson::detail;
11
12void check(const char* input, std::string expected) {
13 char output[64] = {0};
14 StaticStringWriter sb(output, sizeof(output));
15 TextFormatter<StaticStringWriter> writer(sb);
16 writer.writeString(input);
17 REQUIRE(expected == output);
18 REQUIRE(writer.bytesWritten() == expected.size());
19}
20
21TEST_CASE("TextFormatter::writeString()") {
22 SECTION("EmptyString") {

Callers 1

writeString.cppFile · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected