Merge DynamicJsonDocument with JsonDocument

This commit is contained in:
Benoit Blanchon
2023-03-20 10:49:01 +01:00
parent db9258bcd7
commit 540901e219
164 changed files with 550 additions and 666 deletions

View File

@ -48,7 +48,7 @@ struct PrintableString : public Printable {
TEST_CASE("Printable") {
SECTION("Doesn't overflow") {
DynamicJsonDocument doc(8);
JsonDocument doc(8);
const char* value = "example"; // == 7 chars
doc.set(666); // to make sure we override the value
@ -75,7 +75,7 @@ TEST_CASE("Printable") {
}
SECTION("Overflows early") {
DynamicJsonDocument doc(8);
JsonDocument doc(8);
const char* value = "hello world"; // > 8 chars
doc.set(666); // to make sure we override the value
@ -100,7 +100,7 @@ TEST_CASE("Printable") {
}
SECTION("Overflows adding terminator") {
DynamicJsonDocument doc(8);
JsonDocument doc(8);
const char* value = "overflow"; // == 8 chars
doc.set(666); // to make sure we override the value
@ -133,7 +133,7 @@ TEST_CASE("Printable") {
}
SECTION("String deduplication") {
DynamicJsonDocument doc(128);
JsonDocument doc(128);
doc.add(PrintableString<PrintOneCharacterAtATime>("Hello World!"));
doc.add(PrintableString<PrintAllAtOnce>("Hello World!"));
REQUIRE(doc.size() == 2);