diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 862c1552a..9332af3e6 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -2081,8 +2081,9 @@ class binary_reader } if (!value_in_range_of(number)) { - return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, - exception_message(input_format, "integer value overflow", "size"), nullptr)); + // undo coverage exclusion once the 32bit test is run as part of CI (#3524) + return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, // LCOV_EXCL_LINE + exception_message(input_format, "integer value overflow", "size"), nullptr)); // LCOV_EXCL_LINE } result = static_cast(number); return true; @@ -2131,8 +2132,9 @@ class binary_reader } if (!value_in_range_of(number)) { - return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, - exception_message(input_format, "integer value overflow", "size"), nullptr)); + // undo coverage exclusion once the 32bit test is run as part of CI (#3524) + return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, // LCOV_EXCL_LINE + exception_message(input_format, "integer value overflow", "size"), nullptr)); // LCOV_EXCL_LINE } result = detail::conditional_static_cast(number); return true; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index da199e31e..3dcd48027 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -10766,8 +10766,9 @@ class binary_reader } if (!value_in_range_of(number)) { - return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, - exception_message(input_format, "integer value overflow", "size"), nullptr)); + // undo coverage exclusion once the 32bit test is run as part of CI (#3524) + return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, // LCOV_EXCL_LINE + exception_message(input_format, "integer value overflow", "size"), nullptr)); // LCOV_EXCL_LINE } result = static_cast(number); return true; @@ -10816,8 +10817,9 @@ class binary_reader } if (!value_in_range_of(number)) { - return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, - exception_message(input_format, "integer value overflow", "size"), nullptr)); + // undo coverage exclusion once the 32bit test is run as part of CI (#3524) + return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, // LCOV_EXCL_LINE + exception_message(input_format, "integer value overflow", "size"), nullptr)); // LCOV_EXCL_LINE } result = detail::conditional_static_cast(number); return true;