Tests: use a consistent naming convention for allocators

This commit is contained in:
Benoit Blanchon
2023-07-25 14:53:54 +02:00
parent 7a76da3bc7
commit 30ec507989
25 changed files with 698 additions and 698 deletions

View File

@ -11,8 +11,8 @@
using ArduinoJson::detail::sizeofString;
TEST_CASE("JsonVariant::clear()") {
SpyingAllocator allocator;
JsonDocument doc(&allocator);
SpyingAllocator spy;
JsonDocument doc(&spy);
JsonVariant var = doc.to<JsonVariant>();
SECTION("size goes back to zero") {
@ -33,8 +33,8 @@ TEST_CASE("JsonVariant::clear()") {
var.set(std::string("hello"));
var.clear();
REQUIRE(allocator.log() ==
AllocatorLog() << AllocatorLog::Allocate(sizeofString(5))
<< AllocatorLog::Deallocate(sizeofString(5)));
REQUIRE(spy.log() == AllocatorLog()
<< AllocatorLog::Allocate(sizeofString(5))
<< AllocatorLog::Deallocate(sizeofString(5)));
}
}