@@ -25,6 +25,7 @@ TEST_CASE("MemberProxy::add()") {
2525 REQUIRE (doc.as <std::string>() == " {\" hello\" :[42]}" );
2626 REQUIRE (spy.log () == AllocatorLog{
2727 Allocate (sizeofPool ()),
28+ Allocate (sizeofStaticStringPool ()),
2829 });
2930 }
3031
@@ -34,6 +35,7 @@ TEST_CASE("MemberProxy::add()") {
3435 REQUIRE (doc.as <std::string>() == " {\" hello\" :[\" world\" ]}" );
3536 REQUIRE (spy.log () == AllocatorLog{
3637 Allocate (sizeofPool ()),
38+ Allocate (sizeofStaticStringPool ()),
3739 });
3840 }
3941
@@ -44,6 +46,7 @@ TEST_CASE("MemberProxy::add()") {
4446 REQUIRE (doc.as <std::string>() == " {\" hello\" :[\" world\" ]}" );
4547 REQUIRE (spy.log () == AllocatorLog{
4648 Allocate (sizeofPool ()),
49+ Allocate (sizeofStaticStringPool ()),
4750 Allocate (sizeofString (" world" )),
4851 });
4952 }
@@ -55,8 +58,8 @@ TEST_CASE("MemberProxy::add()") {
5558 REQUIRE (doc.as <std::string>() == " {\" hello\" :[\" world\" ]}" );
5659 REQUIRE (spy.log () == AllocatorLog{
5760 Allocate (sizeofPool ()),
61+ Allocate (sizeofStaticStringPool ()),
5862 Allocate (sizeofString (" world" )),
59-
6063 });
6164 }
6265
@@ -71,6 +74,7 @@ TEST_CASE("MemberProxy::add()") {
7174 REQUIRE (doc.as <std::string>() == " {\" hello\" :[\" world\" ]}" );
7275 REQUIRE (spy.log () == AllocatorLog{
7376 Allocate (sizeofPool ()),
77+ Allocate (sizeofStaticStringPool ()),
7478 Allocate (sizeofString (" world" )),
7579 });
7680 }
@@ -399,7 +403,7 @@ TEST_CASE("MemberProxy under memory constraints") {
399403 }
400404
401405 SECTION (" value slot allocation fails" ) {
402- timebomb.setCountdown (1 );
406+ timebomb.setCountdown (2 );
403407
404408 // fill the pool entirely, but leave one slot for the key
405409 doc[" foo" ][ARDUINOJSON_POOL_CAPACITY - 4 ] = 1 ;
@@ -412,6 +416,7 @@ TEST_CASE("MemberProxy under memory constraints") {
412416 REQUIRE (doc.overflowed () == true );
413417 REQUIRE (spy.log () == AllocatorLog{
414418 Allocate (sizeofPool ()),
419+ Allocate (sizeofStaticStringPool ()),
415420 AllocateFail (sizeofPool ()),
416421 });
417422 }
0 commit comments