forked from bblanchon/ArduinoJson
Remove memoryUsage()
This commit is contained in:
1 parent
2fdacb1ca0
commit
00c9d8680a
43 files changed
+1173
-567
No files matched your search
@@ -5,12 +5,15 @@
|
||||
#include <ArduinoJson.h>
|
||||
#include <catch.hpp>
|
||||
|
||||
#include "Allocators.hpp"
|
||||
|
||||
using namespace Catch::Matchers;
|
||||
|
||||
using ArduinoJson::detail::sizeofObject;
|
||||
|
||||
TEST_CASE("deserializeJson(JsonDocument&)") {
|
||||
JsonDocument doc;
|
||||
SpyingAllocator allocator;
|
||||
JsonDocument doc(&allocator);
|
||||
|
||||
SECTION("Edge cases") {
|
||||
SECTION("null char*") {
|
||||
@@ -114,6 +117,8 @@ TEST_CASE("deserializeJson(JsonDocument&)") {
|
||||
deserializeJson(doc, "{}");
|
||||
|
||||
REQUIRE(doc.is<JsonObject>());
|
||||
REQUIRE(doc.memoryUsage() == sizeofObject(0));
|
||||
REQUIRE(allocator.log() == AllocatorLog()
|
||||
<< AllocatorLog::Allocate(sizeofPool())
|
||||
<< AllocatorLog::Deallocate(sizeofPool()));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user