forked from bblanchon/ArduinoJson
Rename tests in MixedConfiguration
This commit is contained in:
@@ -7,43 +7,51 @@
|
||||
TEST_CASE("ARDUINOJSON_STRING_LENGTH_SIZE == 4") {
|
||||
JsonDocument doc;
|
||||
|
||||
SECTION("set() returns true if string has 65536 characters") {
|
||||
auto result = doc.set(std::string(65536, '?'));
|
||||
SECTION("set(std::string)") {
|
||||
SECTION("returns true if string length >= 65536") {
|
||||
auto result = doc.set(std::string(65536, '?'));
|
||||
|
||||
REQUIRE(result == true);
|
||||
REQUIRE(doc.overflowed() == false);
|
||||
REQUIRE(result == true);
|
||||
REQUIRE(doc.overflowed() == false);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("set() returns true if binary has 65536 characters") {
|
||||
auto str = std::string(65536, '?');
|
||||
auto result = doc.set(MsgPackBinary(str.data(), str.size()));
|
||||
SECTION("set(MsgPackBinary)") {
|
||||
SECTION("returns true if size >= 65536") {
|
||||
auto str = std::string(65536, '?');
|
||||
auto result = doc.set(MsgPackBinary(str.data(), str.size()));
|
||||
|
||||
REQUIRE(result == true);
|
||||
REQUIRE(doc.overflowed() == false);
|
||||
REQUIRE(result == true);
|
||||
REQUIRE(doc.overflowed() == false);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("deserializeJson() returns Ok if string has 65536 characters") {
|
||||
auto input = "\"" + std::string(65536, '?') + "\"";
|
||||
SECTION("deserializeJson()") {
|
||||
SECTION("returns Ok if string length >= 65536") {
|
||||
auto input = "\"" + std::string(65536, '?') + "\"";
|
||||
|
||||
auto err = deserializeJson(doc, input);
|
||||
auto err = deserializeJson(doc, input);
|
||||
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("deserializeMsgPack() returns Ok if string has 65536 characters") {
|
||||
auto input = "\xda\xff\xff" + std::string(65536, '?');
|
||||
SECTION("deserializeMsgPack()") {
|
||||
SECTION("returns Ok if string size >= 65536") {
|
||||
auto input = "\xda\xff\xff" + std::string(65536, '?');
|
||||
|
||||
auto err = deserializeMsgPack(doc, input);
|
||||
auto err = deserializeMsgPack(doc, input);
|
||||
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
}
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
}
|
||||
|
||||
SECTION("deserializeMsgPack() returns Ok if binary has 65536 characters") {
|
||||
auto input = "\xc5\xff\xff" + std::string(65536, '?');
|
||||
SECTION("returns Ok if binary size >= 65536") {
|
||||
auto input = "\xc5\xff\xff" + std::string(65536, '?');
|
||||
|
||||
auto err = deserializeMsgPack(doc, input);
|
||||
auto err = deserializeMsgPack(doc, input);
|
||||
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("bin 32 deserialization") {
|
||||
|
||||
Reference in New Issue
Block a user