🔨 fixed number parsing
This commit is contained in:
parent
3b069b4b4c
commit
06e2a291b1
4 changed files with 43 additions and 26 deletions
|
@ -529,7 +529,7 @@ TEST_CASE("parser class")
|
|||
if (c > 0x1f)
|
||||
{
|
||||
CHECK_THROWS_WITH(json::parser(s.c_str()).parse(),
|
||||
"[json.exception.parse_error.101] parse error at 3: syntax error - invalid string: forbidden character after backspace; last read '\"\\" + std::string(1, c) + "'");
|
||||
"[json.exception.parse_error.101] parse error at 3: syntax error - invalid string: forbidden character after backspace; last read '\"\\" + std::string(1, static_cast<char>(c)) + "'");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -216,6 +216,7 @@ TEST_CASE("regression tests")
|
|||
{
|
||||
json a = {1, 2, 3};
|
||||
json::reverse_iterator rit = ++a.rbegin();
|
||||
CHECK(*rit == json(2));
|
||||
}
|
||||
{
|
||||
json a = {1, 2, 3};
|
||||
|
|
|
@ -305,6 +305,7 @@ TEST_CASE("compliance tests from nativejson-benchmark")
|
|||
std::string json_string( (std::istreambuf_iterator<char>(f) ),
|
||||
(std::istreambuf_iterator<char>()) );
|
||||
|
||||
CAPTURE(json_string);
|
||||
json j = json::parse(json_string);
|
||||
CHECK(j.dump() == json_string);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue