more test cases
This commit is contained in:
parent
f6f7fcc88c
commit
a201bc981d
1 changed files with 10 additions and 0 deletions
|
@ -4052,6 +4052,15 @@ TEST_CASE("parser class")
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case (' '):
|
||||||
|
case ('\t'):
|
||||||
|
case ('\n'):
|
||||||
|
case ('\r'):
|
||||||
|
{
|
||||||
|
CHECK(json::parser(s).last_token == json::parser::token_type::end_of_input);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
CHECK(json::parser(s).last_token == json::parser::token_type::parse_error);
|
CHECK(json::parser(s).last_token == json::parser::token_type::parse_error);
|
||||||
|
@ -4095,5 +4104,6 @@ TEST_CASE("parser class")
|
||||||
CHECK(json::parser::token_type_name(json::parser::token_type::name_separator) == ":");
|
CHECK(json::parser::token_type_name(json::parser::token_type::name_separator) == ":");
|
||||||
CHECK(json::parser::token_type_name(json::parser::token_type::value_separator) == ",");
|
CHECK(json::parser::token_type_name(json::parser::token_type::value_separator) == ",");
|
||||||
CHECK(json::parser::token_type_name(json::parser::token_type::parse_error) == "<parse error>");
|
CHECK(json::parser::token_type_name(json::parser::token_type::parse_error) == "<parse error>");
|
||||||
|
CHECK(json::parser::token_type_name(json::parser::token_type::end_of_input) == "<end of input>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue