Inverted dependency between MemoryPool and string adapters.

Inserted a null after each raw string in the pool.
This commit is contained in:
Benoit Blanchon
2020-07-08 09:38:27 +02:00
parent 7e58347fbe
commit 04c59985a1
25 changed files with 143 additions and 119 deletions

View File

@ -7,9 +7,9 @@
template <size_t Capacity>
static void check(const char* input, DeserializationError expected) {
StaticJsonDocument<Capacity> variant;
StaticJsonDocument<Capacity> doc;
DeserializationError error = deserializeMsgPack(variant, input);
DeserializationError error = deserializeMsgPack(doc, input);
CAPTURE(input);
REQUIRE(error == expected);
@ -17,7 +17,7 @@ static void check(const char* input, DeserializationError expected) {
template <size_t Size>
static void checkString(const char* input, DeserializationError expected) {
check<JSON_STRING_SIZE(Size)>(input, expected);
check<Size>(input, expected);
}
TEST_CASE("deserializeMsgPack(StaticJsonDocument&)") {