Commit a201bc98 authored by Niels's avatar Niels

more test cases

parent f6f7fcc8
...@@ -4052,6 +4052,15 @@ TEST_CASE("parser class") ...@@ -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") ...@@ -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>");
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment