Merge DynamicJsonDocument with JsonDocument

This commit is contained in:
Benoit Blanchon committed 2023-03-20 14:49:51 +01:00
1 parent db9258bcd7
commit 540901e219
164 files changed
+550 -666

No files matched your search

+4 -4
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);