Added overflow handling in JsonVariant::as<T>() and JsonVariant::is<T>()

This commit is contained in:
Benoit Blanchon
2019-03-06 15:31:37 +01:00
parent 746f2882f7
commit 576543c4b4
42 changed files with 781 additions and 434 deletions

View File

@ -60,9 +60,11 @@ TEST_CASE("deserializeMsgPack() returns IncompleteInput") {
checkAllSizes("\xCE\x00\x00\x00\x01", 5);
}
#if ARDUINOJSON_USE_LONG_LONG
SECTION("uint 64") {
checkAllSizes("\xCF\x00\x00\x00\x00\x00\x00\x00\x00", 9);
}
#endif
SECTION("int 8") {
checkAllSizes("\xD0\x01", 2);
@ -76,9 +78,11 @@ TEST_CASE("deserializeMsgPack() returns IncompleteInput") {
checkAllSizes("\xD2\x00\x00\x00\x01", 5);
}
#if ARDUINOJSON_USE_LONG_LONG
SECTION("int 64") {
checkAllSizes("\xD3\x00\x00\x00\x00\x00\x00\x00\x00", 9);
}
#endif
SECTION("float 32") {
checkAllSizes("\xCA\x40\x48\xF5\xC3", 5);