Lines Matching refs:field1
124 RepeatedField<int> field1; in TEST() local
127 field1.Add(5); in TEST()
128 field1.Add(42); in TEST()
130 EXPECT_FALSE(field1.empty()); in TEST()
131 EXPECT_EQ(field1.size(), 2); in TEST()
132 EXPECT_EQ(field1.Get(0), 5); in TEST()
133 EXPECT_EQ(field1.Get(1), 42); in TEST()
138 field1.Swap(&field2); in TEST()
140 EXPECT_TRUE(field1.empty()); in TEST()
141 EXPECT_EQ(field1.size(), 0); in TEST()
150 RepeatedField<int> field1; in TEST() local
154 field1.Add(i * i); in TEST()
158 field1.Swap(&field2); in TEST()
160 EXPECT_EQ(field1.size(), 2); in TEST()
161 EXPECT_EQ(field1.Get(0), 5); in TEST()
162 EXPECT_EQ(field1.Get(1), 42); in TEST()
170 RepeatedField<int> field1; in TEST() local
173 field1.Add(5); in TEST()
174 field1.Add(42); in TEST()
176 field1.Add(i); in TEST()
179 field2.Swap(&field1); in TEST()
181 EXPECT_EQ(field1.size(), 16); in TEST()
183 EXPECT_EQ(field1.Get(i), i * i); in TEST()
543 RepeatedPtrField<string> field1; in TEST() local
546 EXPECT_TRUE(field1.empty()); in TEST()
547 EXPECT_EQ(field1.size(), 0); in TEST()
551 field1.Add()->assign("foo"); in TEST()
552 field1.Add()->assign("bar"); in TEST()
554 EXPECT_FALSE(field1.empty()); in TEST()
555 EXPECT_EQ(field1.size(), 2); in TEST()
556 EXPECT_EQ(field1.Get(0), "foo"); in TEST()
557 EXPECT_EQ(field1.Get(1), "bar"); in TEST()
562 field1.Swap(&field2); in TEST()
564 EXPECT_TRUE(field1.empty()); in TEST()
565 EXPECT_EQ(field1.size(), 0); in TEST()
573 RepeatedPtrField<string> field1; in TEST() local
579 *field1.Add() += 'a' + i; in TEST()
581 field1.Swap(&field2); in TEST()
583 EXPECT_EQ(field1.size(), 2); in TEST()
584 EXPECT_EQ(field1.Get(0), "foo"); in TEST()
585 EXPECT_EQ(field1.Get(1), "bar"); in TEST()
594 RepeatedPtrField<string> field1; in TEST() local
597 field1.Add()->assign("foo"); in TEST()
598 field1.Add()->assign("bar"); in TEST()
600 *field1.Add() += 'A' + i; in TEST()
603 field2.Swap(&field1); in TEST()
605 EXPECT_EQ(field1.size(), 16); in TEST()
607 EXPECT_EQ(field1.Get(i).size(), 1); in TEST()
608 EXPECT_EQ(field1.Get(i)[0], 'a' + i); in TEST()