mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-10-28 13:11:39 +01:00
Store static strings in a dedicated pool
Because a slot id is smaller than a pointer, this change will ultimately allow reducing the slot size.
This commit is contained in:
@@ -37,7 +37,9 @@ TEST_CASE("JsonDocument::set()") {
|
||||
doc.set("example");
|
||||
|
||||
REQUIRE(doc.as<const char*>() == "example"_s);
|
||||
REQUIRE(spy.log() == AllocatorLog{});
|
||||
REQUIRE(spy.log() == AllocatorLog{
|
||||
Allocate(sizeofStaticStringPool()),
|
||||
});
|
||||
}
|
||||
|
||||
SECTION("const char*") {
|
||||
|
||||
Reference in New Issue
Block a user