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

@ -22,7 +22,8 @@ TEST_CASE("JsonArray::operator[]") {
SECTION("long long") {
array[0] = 9223372036854775807;
REQUIRE(9223372036854775807 == array[0].as<int64_t>());
REQUIRE(true == array[0].is<int>());
REQUIRE(true == array[0].is<int64_t>());
REQUIRE(false == array[0].is<int32_t>());
REQUIRE(false == array[0].is<bool>());
}
#endif