forked from bblanchon/ArduinoJson
Removed default capacity of DynamicJsonDocument
This commit is contained in:
@ -7,22 +7,22 @@
|
||||
|
||||
template <typename T, typename U>
|
||||
static void check(const char* input, U expected) {
|
||||
DynamicJsonDocument variant;
|
||||
DynamicJsonDocument doc(4096);
|
||||
|
||||
DeserializationError error = deserializeMsgPack(variant, input);
|
||||
DeserializationError error = deserializeMsgPack(doc, input);
|
||||
|
||||
REQUIRE(error == DeserializationError::Ok);
|
||||
REQUIRE(variant.is<T>());
|
||||
REQUIRE(variant.as<T>() == expected);
|
||||
REQUIRE(doc.is<T>());
|
||||
REQUIRE(doc.as<T>() == expected);
|
||||
}
|
||||
|
||||
static void checkIsNull(const char* input) {
|
||||
DynamicJsonDocument variant;
|
||||
DynamicJsonDocument doc(4096);
|
||||
|
||||
DeserializationError error = deserializeMsgPack(variant, input);
|
||||
DeserializationError error = deserializeMsgPack(doc, input);
|
||||
|
||||
REQUIRE(error == DeserializationError::Ok);
|
||||
REQUIRE(variant.as<JsonVariant>().isNull());
|
||||
REQUIRE(doc.as<JsonVariant>().isNull());
|
||||
}
|
||||
|
||||
TEST_CASE("deserialize MsgPack value") {
|
||||
|
Reference in New Issue
Block a user