From c3a69837dee241c70db174e5f4f80a6aea130fd4 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Nov 2026 05:45:17 +0000 Subject: [PATCH] tests: skip throwing json_view bool get() combinations without exceptions (#5988) check_boolean_get_parity() called get() for number_integer_t, number_unsigned_t and number_float_t in its JSON_NOEXCEPTION branch, but a boolean throws type_error.302 for exactly these types, so JSON_THROW aborted test-json_view_cpp11/cpp17 in ci_test_noexceptions. Skip these combinations there; the throwing checks stay in the exceptions-enabled build. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01N5NasAgbDGG28MqXjQvLqp Signed-off-by: Claude --- tests/src/unit-json_view.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 } }