✅ improved test coverage
This commit is contained in:
parent
9e07e9b4ec
commit
99ecca55c4
6 changed files with 269 additions and 5 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue