Lines Matching refs:json
51 std::string json = "{\"" + json_key + "\": \"test\"}"; in TestParseOkWithUnknownKey() local
52 auto object = JsonStringToMessage<T>(json); in TestParseOkWithUnknownKey()
59 ASSERT_FALSE(AllFieldsAreKnown(*object, json, &error)) in TestParseOkWithUnknownKey()
67 std::string json = in TEST_F() local
74 auto object = JsonStringToMessage<WithJsonName>(json); in TEST_F()
83 EXPECT_TRUE(AllFieldsAreKnown(*object, json, &error)) << error; in TEST_F()
106 std::string json = in TEST_F() local
113 auto object = JsonStringToMessage<NoJsonName>(json); in TEST_F()
122 EXPECT_TRUE(AllFieldsAreKnown(*object, json, &error)) << error; in TEST_F()
151 ErrorOr<Parent> TestEmbeddedError(const std::string& json, in TestEmbeddedError() argument
153 auto object = JsonStringToMessage<Parent>(json); in TestEmbeddedError()
156 EXPECT_FALSE(AllFieldsAreKnown(*object, json, &error)) in TestEmbeddedError()
165 std::string json = in TEST_F() local
172 auto object = JsonStringToMessage<Parent>(json); in TEST_F()
183 EXPECT_TRUE(AllFieldsAreKnown(*object, json, &error)) << error; in TEST_F()
238 bool EqReformattedJson(const std::string& json, std::string* error) { in EqReformattedJson() argument
239 return android::jsonpb::EqReformattedJson(json, &scalar_, error); in EqReformattedJson()
247 std::string json = in TEST_F() local
257 auto formatted = FormatJson(json, &scalar_); in TEST_F()
259 EXPECT_TRUE(IsJsonEq(json, *formatted)); in TEST_F()
261 EXPECT_TRUE(EqReformattedJson(json, &error_)) << error_; in TEST_F()
270 std::string json; in TEST_P() local
272 std::tie(json, message) = GetParam(); in TEST_P()
273 auto formatted = FormatJson(json, &scalar_); in TEST_P()
275 EXPECT_FALSE(IsJsonEq(json, *formatted)) << message; in TEST_P()
276 EXPECT_FALSE(EqReformattedJson(json, &error_)) in TEST_P()