mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
✅ improved test coverage
This commit is contained in:
@ -5699,6 +5699,7 @@ class binary_reader
|
||||
using json_sax_t = json_sax<BasicJsonType>;
|
||||
|
||||
public:
|
||||
/// the supported binary input formats
|
||||
enum class binary_format_t { cbor, msgpack, ubjson };
|
||||
|
||||
/*!
|
||||
@ -7016,8 +7017,8 @@ class binary_reader
|
||||
|
||||
default:
|
||||
{
|
||||
result = std::size_t(-1);
|
||||
return true;
|
||||
auto last_token = get_token_string();
|
||||
return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, "byte after '#' must denote a number type; last byte: 0x" + last_token));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7050,6 +7051,10 @@ class binary_reader
|
||||
get_ignore_noop();
|
||||
if (JSON_UNLIKELY(current != '#'))
|
||||
{
|
||||
if (JSON_UNLIKELY(not unexpect_eof()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
auto last_token = get_token_string();
|
||||
return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, "expected '#' after UBJSON type information; last byte: 0x" + last_token));
|
||||
}
|
||||
|
Reference in New Issue
Block a user