forked from bblanchon/ArduinoJson
Tests: use a consistent naming convention for allocators
This commit is contained in:
@ -13,8 +13,8 @@ using ArduinoJson::detail::sizeofArray;
|
||||
using ArduinoJson::detail::sizeofString;
|
||||
|
||||
TEST_CASE("string_view") {
|
||||
SpyingAllocator allocator;
|
||||
JsonDocument doc(&allocator);
|
||||
SpyingAllocator spy;
|
||||
JsonDocument doc(&spy);
|
||||
JsonVariant variant = doc.to<JsonVariant>();
|
||||
|
||||
SECTION("deserializeJson()") {
|
||||
@ -63,10 +63,10 @@ TEST_CASE("string_view") {
|
||||
doc.add(std::string_view("example\0tree", 12));
|
||||
doc.add(std::string_view("example\0tree and a half", 12));
|
||||
|
||||
REQUIRE(allocator.log() == AllocatorLog()
|
||||
<< AllocatorLog::Allocate(sizeofPool())
|
||||
<< AllocatorLog::Allocate(sizeofString(7))
|
||||
<< AllocatorLog::Allocate(sizeofString(12)));
|
||||
REQUIRE(spy.log() == AllocatorLog()
|
||||
<< AllocatorLog::Allocate(sizeofPool())
|
||||
<< AllocatorLog::Allocate(sizeofString(7))
|
||||
<< AllocatorLog::Allocate(sizeofString(12)));
|
||||
}
|
||||
|
||||
SECTION("as<std::string_view>()") {
|
||||
|
Reference in New Issue
Block a user