removed unnecessary code (numbers must not begin with "+")
This commit is contained in:
parent
688cd49bdc
commit
85a30813c8
@ -449,7 +449,7 @@ $ make
|
||||
$ ./json_unit "*"
|
||||
|
||||
===============================================================================
|
||||
All tests passed (5568703 assertions in 31 test cases)
|
||||
All tests passed (5568705 assertions in 31 test cases)
|
||||
```
|
||||
|
||||
For more information, have a look at the file [.travis.yml](https://github.com/nlohmann/json/blob/master/.travis.yml).
|
||||
|
@ -8448,10 +8448,6 @@ basic_json_parser_63:
|
||||
{
|
||||
type = value_t::number_unsigned;
|
||||
max = static_cast<uint64_t>(std::numeric_limits<number_unsigned_t>::max());
|
||||
if (*curptr == '+')
|
||||
{
|
||||
curptr++;
|
||||
}
|
||||
}
|
||||
|
||||
// count the significant figures
|
||||
|
@ -7758,10 +7758,6 @@ class basic_json
|
||||
{
|
||||
type = value_t::number_unsigned;
|
||||
max = static_cast<uint64_t>(std::numeric_limits<number_unsigned_t>::max());
|
||||
if (*curptr == '+')
|
||||
{
|
||||
curptr++;
|
||||
}
|
||||
}
|
||||
|
||||
// count the significant figures
|
||||
|
@ -9776,6 +9776,10 @@ TEST_CASE("parser class")
|
||||
CHECK_THROWS_AS(json::parser("-0e-:").parse(), std::invalid_argument);
|
||||
CHECK_THROWS_AS(json::parser("-0f").parse(), std::invalid_argument);
|
||||
|
||||
// numbers must not begin with "+"
|
||||
CHECK_THROWS_AS(json::parser("+1").parse(), std::invalid_argument);
|
||||
CHECK_THROWS_AS(json::parser("+0").parse(), std::invalid_argument);
|
||||
|
||||
CHECK_THROWS_WITH(json::parser("01").parse(),
|
||||
"parse error - unexpected number literal; expected end of input");
|
||||
CHECK_THROWS_WITH(json::parser("--1").parse(), "parse error - unexpected '-'");
|
||||
|
Loading…
Reference in New Issue
Block a user