Lines Matching refs:object

52     auto object = JsonStringToMessage<T>(json);  in TestParseOkWithUnknownKey()  local
53 ASSERT_TRUE(object.ok()) << object.error(); in TestParseOkWithUnknownKey()
56 object->GetReflection()->GetString( in TestParseOkWithUnknownKey()
57 *object, object->GetDescriptor()->FindFieldByName(field_name))); in TestParseOkWithUnknownKey()
59 ASSERT_FALSE(AllFieldsAreKnown(*object, json, &error)) in TestParseOkWithUnknownKey()
74 auto object = JsonStringToMessage<WithJsonName>(json); in TEST_F() local
75 ASSERT_TRUE(object.ok()) << object.error(); in TEST_F()
77 EXPECT_EQ("foo_bar", object->foo_bar()); in TEST_F()
78 EXPECT_EQ("barBaz", object->barbaz()); in TEST_F()
79 EXPECT_EQ("BazQux", object->bazqux()); in TEST_F()
80 EXPECT_EQ("QUX_QUUX", object->qux_quux()); in TEST_F()
83 EXPECT_TRUE(AllFieldsAreKnown(*object, json, &error)) << error; in TEST_F()
113 auto object = JsonStringToMessage<NoJsonName>(json); in TEST_F() local
114 ASSERT_TRUE(object.ok()) << object.error(); in TEST_F()
116 EXPECT_EQ("foo_bar", object->foo_bar()); in TEST_F()
117 EXPECT_EQ("barBaz", object->barbaz()); in TEST_F()
118 EXPECT_EQ("BazQux", object->bazqux()); in TEST_F()
119 EXPECT_EQ("QUX_QUUX", object->qux_quux()); in TEST_F()
122 EXPECT_TRUE(AllFieldsAreKnown(*object, json, &error)) << error; in TEST_F()
153 auto object = JsonStringToMessage<Parent>(json); in TestEmbeddedError() local
154 if (!object.ok()) return object; in TestEmbeddedError()
156 EXPECT_FALSE(AllFieldsAreKnown(*object, json, &error)) in TestEmbeddedError()
160 return object; in TestEmbeddedError()
172 auto object = JsonStringToMessage<Parent>(json); in TEST_F() local
173 ASSERT_TRUE(object.ok()) << object.error(); in TEST_F()
175 EXPECT_EQ("foo_bar", object->with_json_name().foo_bar()); in TEST_F()
176 ASSERT_EQ(1u, object->repeated_with_json_name().size()); in TEST_F()
177 EXPECT_EQ("barBaz", object->repeated_with_json_name().begin()->barbaz()); in TEST_F()
178 EXPECT_EQ("BazQux", object->no_json_name().bazqux()); in TEST_F()
179 ASSERT_EQ(1u, object->repeated_no_json_name().size()); in TEST_F()
180 EXPECT_EQ("QUX_QUUX", object->repeated_no_json_name().begin()->qux_quux()); in TEST_F()
183 EXPECT_TRUE(AllFieldsAreKnown(*object, json, &error)) << error; in TEST_F()
187 auto object = TestEmbeddedError( in TEST_F() local
189 ASSERT_TRUE(object.ok()) << object.error(); in TEST_F()
190 EXPECT_EQ("test", object->with_json_name().foo_bar()); in TEST_F()
194 auto object = TestEmbeddedError( in TEST_F() local
196 ASSERT_TRUE(object.ok()) << object.error(); in TEST_F()
197 ASSERT_EQ(1u, object->repeated_with_json_name().size()); in TEST_F()
198 EXPECT_EQ("test", object->repeated_with_json_name().begin()->barbaz()); in TEST_F()
202 auto object = TestEmbeddedError( in TEST_F() local
204 ASSERT_TRUE(object.ok()) << object.error(); in TEST_F()
205 EXPECT_EQ("test", object->no_json_name().qux_quux()); in TEST_F()
209 auto object = TestEmbeddedError( in TEST_F() local
211 ASSERT_TRUE(object.ok()) << object.error(); in TEST_F()
212 ASSERT_EQ(1u, object->repeated_no_json_name().size()); in TEST_F()
213 EXPECT_EQ("test", object->repeated_no_json_name().begin()->qux_quux()); in TEST_F()