Lines Matching refs:CHECK
41 CHECK((scan_string("[") == json::lexer::token_type::begin_array));
42 CHECK((scan_string("]") == json::lexer::token_type::end_array));
43 CHECK((scan_string("{") == json::lexer::token_type::begin_object));
44 CHECK((scan_string("}") == json::lexer::token_type::end_object));
45 CHECK((scan_string(",") == json::lexer::token_type::value_separator));
46 CHECK((scan_string(":") == json::lexer::token_type::name_separator));
51 CHECK((scan_string("null") == json::lexer::token_type::literal_null));
52 CHECK((scan_string("true") == json::lexer::token_type::literal_true));
53 CHECK((scan_string("false") == json::lexer::token_type::literal_false));
58 CHECK((scan_string("0") == json::lexer::token_type::value_unsigned));
59 CHECK((scan_string("1") == json::lexer::token_type::value_unsigned));
60 CHECK((scan_string("2") == json::lexer::token_type::value_unsigned));
61 CHECK((scan_string("3") == json::lexer::token_type::value_unsigned));
62 CHECK((scan_string("4") == json::lexer::token_type::value_unsigned));
63 CHECK((scan_string("5") == json::lexer::token_type::value_unsigned));
64 CHECK((scan_string("6") == json::lexer::token_type::value_unsigned));
65 CHECK((scan_string("7") == json::lexer::token_type::value_unsigned));
66 CHECK((scan_string("8") == json::lexer::token_type::value_unsigned));
67 CHECK((scan_string("9") == json::lexer::token_type::value_unsigned));
69 CHECK((scan_string("-0") == json::lexer::token_type::value_integer));
70 CHECK((scan_string("-1") == json::lexer::token_type::value_integer));
72 CHECK((scan_string("1.1") == json::lexer::token_type::value_float));
73 CHECK((scan_string("-1.1") == json::lexer::token_type::value_float));
74 CHECK((scan_string("1E10") == json::lexer::token_type::value_float));
80 CHECK((scan_string(" ") == json::lexer::token_type::end_of_input));
81 CHECK((scan_string("\t") == json::lexer::token_type::end_of_input));
82 CHECK((scan_string("\n") == json::lexer::token_type::end_of_input));
83 CHECK((scan_string("\r") == json::lexer::token_type::end_of_input));
84 CHECK((scan_string(" \t\n\r\n\t ") == json::lexer::token_type::end_of_input));
90 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::uninitialized)) == "<uninitialized>"));
91 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::literal_true)) == "true literal"));
92 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::literal_false)) == "false literal"));
93 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::literal_null)) == "null literal"));
94 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::value_string)) == "string literal"));
95 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::value_unsigned)) == "number literal"));
96 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::value_integer)) == "number literal"));
97 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::value_float)) == "number literal"));
98 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::begin_array)) == "'['"));
99 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::begin_object)) == "'{'"));
100 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::end_array)) == "']'"));
101 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::end_object)) == "'}'"));
102 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::name_separator)) == "':'"));
103 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::value_separator)) == "','"));
104 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::parse_error)) == "<parse error>"));
105 CHECK((std::string(json::lexer::token_type_name(json::lexer::token_type::end_of_input)) == "end of input"));
139 CHECK((res != json::lexer::token_type::parse_error));
149 CHECK((res == json::lexer::token_type::end_of_input));
156 CHECK((res == json::lexer::token_type::parse_error));
169 CHECK((scan_string(s.c_str()) == json::lexer::token_type::value_string));
174 CHECK((scan_string("/", false) == json::lexer::token_type::parse_error));
175 CHECK(get_error_message("/", false) == "invalid literal");
177 CHECK((scan_string("/!", false) == json::lexer::token_type::parse_error));
178 CHECK(get_error_message("/!", false) == "invalid literal");
179 CHECK((scan_string("/*", false) == json::lexer::token_type::parse_error));
180 CHECK(get_error_message("/*", false) == "invalid literal");
181 CHECK((scan_string("/**", false) == json::lexer::token_type::parse_error));
182 CHECK(get_error_message("/**", false) == "invalid literal");
184 CHECK((scan_string("//", false) == json::lexer::token_type::parse_error));
185 CHECK(get_error_message("//", false) == "invalid literal");
186 CHECK((scan_string("/**/", false) == json::lexer::token_type::parse_error));
187 CHECK(get_error_message("/**/", false) == "invalid literal");
188 CHECK((scan_string("/** /", false) == json::lexer::token_type::parse_error));
189 CHECK(get_error_message("/** /", false) == "invalid literal");
191 CHECK((scan_string("/***/", false) == json::lexer::token_type::parse_error));
192 CHECK(get_error_message("/***/", false) == "invalid literal");
193 CHECK((scan_string("/* true */", false) == json::lexer::token_type::parse_error));
194 CHECK(get_error_message("/* true */", false) == "invalid literal");
195 CHECK((scan_string("/*/**/", false) == json::lexer::token_type::parse_error));
196 CHECK(get_error_message("/*/**/", false) == "invalid literal");
197 CHECK((scan_string("/*/* */", false) == json::lexer::token_type::parse_error));
198 CHECK(get_error_message("/*/* */", false) == "invalid literal");
203 CHECK((scan_string("/", true) == json::lexer::token_type::parse_error));
204 CHECK(get_error_message("/", true) == "invalid comment; expecting '/' or '*' after '/'");
206 CHECK((scan_string("/!", true) == json::lexer::token_type::parse_error));
207 CHECK(get_error_message("/!", true) == "invalid comment; expecting '/' or '*' after '/'");
208 CHECK((scan_string("/*", true) == json::lexer::token_type::parse_error));
209 CHECK(get_error_message("/*", true) == "invalid comment; missing closing '*/'");
210 CHECK((scan_string("/**", true) == json::lexer::token_type::parse_error));
211 CHECK(get_error_message("/**", true) == "invalid comment; missing closing '*/'");
213 CHECK((scan_string("//", true) == json::lexer::token_type::end_of_input));
214 CHECK((scan_string("/**/", true) == json::lexer::token_type::end_of_input));
215 CHECK((scan_string("/** /", true) == json::lexer::token_type::parse_error));
216 CHECK(get_error_message("/** /", true) == "invalid comment; missing closing '*/'");
218 CHECK((scan_string("/***/", true) == json::lexer::token_type::end_of_input));
219 CHECK((scan_string("/* true */", true) == json::lexer::token_type::end_of_input));
220 CHECK((scan_string("/*/**/", true) == json::lexer::token_type::end_of_input));
221 CHECK((scan_string("/*/* */", true) == json::lexer::token_type::end_of_input));
223 CHECK((scan_string("//\n//\n", true) == json::lexer::token_type::end_of_input));
224 CHECK((scan_string("/**//**//**/", true) == json::lexer::token_type::end_of_input));