🔨 fixed test case

pull/578/head
Niels Lohmann 2017-03-28 20:29:27 +02:00
parent 50e251f5f6
commit d37ca2eba8
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
1 changed files with 16 additions and 16 deletions

View File

@ -87,22 +87,22 @@ TEST_CASE("lexer class")
SECTION("token_type_name")
{
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::uninitialized)) == "<uninitialized>"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::literal_true)) == "true literal"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::literal_false)) == "false literal"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::literal_null)) == "null literal"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::value_string)) == "string literal"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::value_unsigned)) == "number literal"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::value_integer)) == "number literal"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::value_float)) == "number literal"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::begin_array)) == "'['"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::begin_object)) == "'{'"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::end_array)) == "']'"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::end_object)) == "'}'"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::name_separator)) == "':'"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::value_separator)) == "','"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::parse_error)) == "<parse error>"));
CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::end_of_input)) == "end of input"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::uninitialized)) == "<uninitialized>"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::literal_true)) == "true literal"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::literal_false)) == "false literal"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::literal_null)) == "null literal"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::value_string)) == "string literal"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::value_unsigned)) == "number literal"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::value_integer)) == "number literal"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::value_float)) == "number literal"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::begin_array)) == "'['"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::begin_object)) == "'{'"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::end_array)) == "']'"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::end_object)) == "'}'"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::name_separator)) == "':'"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::value_separator)) == "','"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::parse_error)) == "<parse error>"));
CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::end_of_input)) == "end of input"));
}
SECTION("parse errors on first character")