We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d95a3bd commit b3132caCopy full SHA for b3132ca
extras/tests/Helpers/Allocators.hpp
@@ -120,6 +120,7 @@ class SpyingAllocator : public ArduinoJson::Allocator {
120
_upstream->reallocate(block, sizeof(AllocatedBlock) + n - 1));
121
if (block) {
122
_log << AllocatorLog::Reallocate(oldSize, n);
123
+ ARDUINOJSON_ASSERT(block->size == oldSize);
124
block->size = n;
125
return block->payload;
126
} else {
@@ -128,6 +129,10 @@ class SpyingAllocator : public ArduinoJson::Allocator {
128
129
}
130
131
132
+ void clearLog() {
133
+ _log = AllocatorLog();
134
+ }
135
+
136
const AllocatorLog& log() const {
137
return _log;
138
0 commit comments