Made JsonBuffer non-copyable (PR #524 by @luisrayas3)

This commit is contained in:
Benoit Blanchon
2017-06-17 14:17:01 +02:00
parent e9d88dda8e
commit 508f936317
7 changed files with 39 additions and 15 deletions

View File

@ -36,10 +36,10 @@ TEST_CASE("DynamicJsonBuffer::alloc()") {
SECTION("Alignment") {
// make room for two but not three
buffer = DynamicJsonBuffer(2 * sizeof(void*) + 1);
DynamicJsonBuffer tinyBuf(2 * sizeof(void*) + 1);
REQUIRE(isAligned(buffer.alloc(1))); // this on is aligned by design
REQUIRE(isAligned(buffer.alloc(1))); // this one fits in the first block
REQUIRE(isAligned(buffer.alloc(1))); // this one requires a new block
REQUIRE(isAligned(tinyBuf.alloc(1))); // this on is aligned by design
REQUIRE(isAligned(tinyBuf.alloc(1))); // this one fits in the first block
REQUIRE(isAligned(tinyBuf.alloc(1))); // this one requires a new block
}
}