Removed the automatic expansion of DynamicJsonDocument

This commit is contained in:
Benoit Blanchon
2018-11-16 10:26:59 +01:00
parent c832edbda3
commit 2bd280df80
28 changed files with 446 additions and 919 deletions

View File

@ -39,6 +39,18 @@ TEST_CASE("DynamicJsonDocument") {
}
}
SECTION("capacity()") {
SECTION("matches constructor argument") {
DynamicJsonDocument doc2(256);
REQUIRE(doc2.capacity() == 256);
}
SECTION("rounds up constructor argument") {
DynamicJsonDocument doc2(253);
REQUIRE(doc2.capacity() == 256);
}
}
SECTION("Copy constructor") {
deserializeJson(doc, "{\"hello\":\"world\"}");
doc.nestingLimit = 42;