diff --git a/test/src/unit-json_pointer.cpp b/test/src/unit-json_pointer.cpp index d5881beac..1e86c0a41 100644 --- a/test/src/unit-json_pointer.cpp +++ b/test/src/unit-json_pointer.cpp @@ -358,6 +358,10 @@ TEST_CASE("JSON pointers") CHECK_THROWS_WITH(j_const[jp] == 1, throw_msg.c_str()); } +#if defined(_MSC_VER) +#pragma warning (push) +#pragma warning (disable : 4127) // on some machines, the check below is not constant +#endif if (sizeof(typename json::size_type) < sizeof(unsigned long long)) { auto size_type_max_uul = static_cast((std::numeric_limits::max)()); @@ -371,6 +375,10 @@ TEST_CASE("JSON pointers") CHECK_THROWS_WITH(j_const[jp] == 1, throw_msg.c_str()); } +#if defined(_MSC_VER) +#pragma warning (pop) +#endif + CHECK_THROWS_AS(j.at("/one"_json_pointer) = 1, json::parse_error&); CHECK_THROWS_WITH(j.at("/one"_json_pointer) = 1, "[json.exception.parse_error.109] parse error: array index 'one' is not a number");