forked from bblanchon/ArduinoJson
Optimize storage of tiny strings (up to 3 characters)
This commit is contained in:
1 parent
7f75985e47
commit
91397f9f06
16 files changed
+229
-57
No files matched your search
@@ -100,13 +100,13 @@ TEST_CASE("JsonObject::set()") {
|
||||
JsonDocument doc3(&timebomb);
|
||||
JsonObject obj3 = doc3.to<JsonObject>();
|
||||
|
||||
obj1["a"_s] = 1;
|
||||
obj1["b"_s] = 2;
|
||||
obj1["alpha"_s] = 1;
|
||||
obj1["beta"_s] = 2;
|
||||
|
||||
bool success = obj3.set(obj1);
|
||||
|
||||
REQUIRE(success == false);
|
||||
REQUIRE(doc3.as<std::string>() == "{\"a\":1}");
|
||||
REQUIRE(doc3.as<std::string>() == "{\"alpha\":1}");
|
||||
}
|
||||
|
||||
SECTION("copy fails in the middle of an array") {
|
||||
|
||||
Reference in new issue
Block a user