forked from bblanchon/ArduinoJson
Always store serialized("string") by copy (#1915)
This commit is contained in:
1 parent
95f5d9d134
commit
806fa907ab
10 files changed
+11
-54
No files matched your search
@@ -115,9 +115,9 @@ TEST_CASE("JsonArray::add()") {
|
||||
REQUIRE(expectedSize == doc.memoryUsage());
|
||||
}
|
||||
|
||||
SECTION("should not duplicate serialized(const char*)") {
|
||||
SECTION("should duplicate serialized(const char*)") {
|
||||
array.add(serialized("{}"));
|
||||
const size_t expectedSize = sizeofArray(1);
|
||||
const size_t expectedSize = sizeofArray(1) + sizeofString(2);
|
||||
REQUIRE(expectedSize == doc.memoryUsage());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user