From 50e251f5f644ca9fd2d2fd58a62f0eff2f31ab18 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 28 Mar 2017 20:17:00 +0200 Subject: [PATCH] :hammer: adjusted test case to new signature of token_type_name() --- test/src/unit-class_lexer.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/src/unit-class_lexer.cpp b/test/src/unit-class_lexer.cpp index d4bf2dd2c..214cae75b 100644 --- a/test/src/unit-class_lexer.cpp +++ b/test/src/unit-class_lexer.cpp @@ -87,22 +87,22 @@ TEST_CASE("lexer class") SECTION("token_type_name") { - CHECK((json::lexer::token_type_name(json::lexer::token_type::uninitialized) == "")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::literal_true) == "true literal")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::literal_false) == "false literal")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::literal_null) == "null literal")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::value_string) == "string literal")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::value_unsigned) == "number literal")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::value_integer) == "number literal")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::value_float) == "number literal")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::begin_array) == "'['")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::begin_object) == "'{'")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::end_array) == "']'")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::end_object) == "'}'")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::name_separator) == "':'")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::value_separator) == "','")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::parse_error) == "")); - CHECK((json::lexer::token_type_name(json::lexer::token_type::end_of_input) == "end of input")); + CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::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)) == "")); + CHECK((json::lexer::token_type_name(std::string(json::lexer::token_type::end_of_input)) == "end of input")); } SECTION("parse errors on first character")