Lines Matching refs:JSONReader

208   scoped_ptr<Value> root = JSONReader::ReadAndReturnError(  in TEST_F()
216 root = JSONReader::ReadAndReturnError(big_json, JSON_PARSE_RFC, &error_code, in TEST_F()
219 EXPECT_EQ(JSONParser::FormatErrorMessage(5, 10, JSONReader::kSyntaxError), in TEST_F()
221 EXPECT_EQ(JSONReader::JSON_SYNTAX_ERROR, error_code); in TEST_F()
229 root = JSONReader::ReadAndReturnError(big_json_crlf, JSON_PARSE_RFC, in TEST_F()
232 EXPECT_EQ(JSONParser::FormatErrorMessage(5, 10, JSONReader::kSyntaxError), in TEST_F()
234 EXPECT_EQ(JSONReader::JSON_SYNTAX_ERROR, error_code); in TEST_F()
237 root = JSONReader::ReadAndReturnError("{},{}", JSON_PARSE_RFC, &error_code, in TEST_F()
241 JSONReader::kUnexpectedDataAfterRoot), error_message); in TEST_F()
242 EXPECT_EQ(JSONReader::JSON_UNEXPECTED_DATA_AFTER_ROOT, error_code); in TEST_F()
249 root = JSONReader::ReadAndReturnError(nested_json, JSON_PARSE_RFC, in TEST_F()
252 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 100, JSONReader::kTooMuchNesting), in TEST_F()
254 EXPECT_EQ(JSONReader::JSON_TOO_MUCH_NESTING, error_code); in TEST_F()
256 root = JSONReader::ReadAndReturnError("[1,]", JSON_PARSE_RFC, &error_code, in TEST_F()
259 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 4, JSONReader::kTrailingComma), in TEST_F()
261 EXPECT_EQ(JSONReader::JSON_TRAILING_COMMA, error_code); in TEST_F()
263 root = JSONReader::ReadAndReturnError("{foo:\"bar\"}", JSON_PARSE_RFC, in TEST_F()
267 JSONReader::kUnquotedDictionaryKey), error_message); in TEST_F()
268 EXPECT_EQ(JSONReader::JSON_UNQUOTED_DICTIONARY_KEY, error_code); in TEST_F()
270 root = JSONReader::ReadAndReturnError("{\"foo\":\"bar\",}", JSON_PARSE_RFC, in TEST_F()
273 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 14, JSONReader::kTrailingComma), in TEST_F()
276 root = JSONReader::ReadAndReturnError("[nu]", JSON_PARSE_RFC, &error_code, in TEST_F()
279 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 2, JSONReader::kSyntaxError), in TEST_F()
281 EXPECT_EQ(JSONReader::JSON_SYNTAX_ERROR, error_code); in TEST_F()
283 root = JSONReader::ReadAndReturnError("[\"xxx\\xq\"]", JSON_PARSE_RFC, in TEST_F()
286 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 7, JSONReader::kInvalidEscape), in TEST_F()
288 EXPECT_EQ(JSONReader::JSON_INVALID_ESCAPE, error_code); in TEST_F()
290 root = JSONReader::ReadAndReturnError("[\"xxx\\uq\"]", JSON_PARSE_RFC, in TEST_F()
293 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 7, JSONReader::kInvalidEscape), in TEST_F()
295 EXPECT_EQ(JSONReader::JSON_INVALID_ESCAPE, error_code); in TEST_F()
297 root = JSONReader::ReadAndReturnError("[\"xxx\\q\"]", JSON_PARSE_RFC, in TEST_F()
300 EXPECT_EQ(JSONParser::FormatErrorMessage(1, 7, JSONReader::kInvalidEscape), in TEST_F()
302 EXPECT_EQ(JSONReader::JSON_INVALID_ESCAPE, error_code); in TEST_F()
312 scoped_ptr<Value> root = JSONReader::ReadAndReturnError( in TEST_F()
320 EXPECT_FALSE(JSONReader::Read("[\"\\ufdd0\"]")); in TEST_F()
321 EXPECT_FALSE(JSONReader::Read("[\"\\ufffe\"]")); in TEST_F()
322 EXPECT_FALSE(JSONReader::Read("[\"\\ud83f\\udffe\"]")); in TEST_F()