diff --git a/tests/src/unit-json_view.cpp b/tests/src/unit-json_view.cpp index e7b4b760f..5f695e1f2 100644 --- a/tests/src/unit-json_view.cpp +++ b/tests/src/unit-json_view.cpp @@ -1578,7 +1578,15 @@ void check_boolean_get_parity() CHECK(view_value == static_cast(b)); } #else - CHECK(j.get() == d.root().template get()); + // without exceptions, the combinations that throw (number_integer_t, number_unsigned_t, number_float_t) + // cannot be run: JSON_THROW aborts + const bool throws = std::is_same::value + || std::is_same::value + || std::is_same::value; + if (!throws) + { + CHECK(j.get() == d.root().template get()); + } #endif } }