Lines Matching refs:map
26 IDMap<TestObject> map; in TEST() local
27 EXPECT_TRUE(map.IsEmpty()); in TEST()
28 EXPECT_EQ(0U, map.size()); in TEST()
33 int32_t id1 = map.Add(&obj1); in TEST()
34 EXPECT_FALSE(map.IsEmpty()); in TEST()
35 EXPECT_EQ(1U, map.size()); in TEST()
36 EXPECT_EQ(&obj1, map.Lookup(id1)); in TEST()
38 int32_t id2 = map.Add(&obj2); in TEST()
39 EXPECT_FALSE(map.IsEmpty()); in TEST()
40 EXPECT_EQ(2U, map.size()); in TEST()
42 EXPECT_EQ(&obj1, map.Lookup(id1)); in TEST()
43 EXPECT_EQ(&obj2, map.Lookup(id2)); in TEST()
45 map.Remove(id1); in TEST()
46 EXPECT_FALSE(map.IsEmpty()); in TEST()
47 EXPECT_EQ(1U, map.size()); in TEST()
49 map.Remove(id2); in TEST()
50 EXPECT_TRUE(map.IsEmpty()); in TEST()
51 EXPECT_EQ(0U, map.size()); in TEST()
53 map.AddWithID(&obj1, 1); in TEST()
54 map.AddWithID(&obj2, 2); in TEST()
55 EXPECT_EQ(&obj1, map.Lookup(1)); in TEST()
56 EXPECT_EQ(&obj2, map.Lookup(2)); in TEST()
58 EXPECT_EQ(&obj2, map.Replace(2, &obj1)); in TEST()
59 EXPECT_EQ(&obj1, map.Lookup(2)); in TEST()
61 EXPECT_EQ(0, map.iteration_depth()); in TEST()
65 IDMap<TestObject> map; in TEST() local
71 map.Add(&obj1); in TEST()
72 map.Add(&obj2); in TEST()
73 map.Add(&obj3); in TEST()
76 IDMap<TestObject>::const_iterator iter(&map); in TEST()
78 EXPECT_EQ(1, map.iteration_depth()); in TEST()
81 map.Remove(iter.GetCurrentKey()); in TEST()
87 EXPECT_TRUE(map.IsEmpty()); in TEST()
88 EXPECT_EQ(0U, map.size()); in TEST()
91 EXPECT_TRUE(map.IsEmpty()); in TEST()
92 EXPECT_EQ(0U, map.size()); in TEST()
94 EXPECT_EQ(0, map.iteration_depth()); in TEST()
98 IDMap<TestObject> map; in TEST() local
104 map.Add(&obj[i]); in TEST()
110 for (IDMap<TestObject>::const_iterator iter(&map); in TEST()
118 for (IDMap<TestObject>::const_iterator iter(&map); in TEST()
120 EXPECT_EQ(1, map.iteration_depth()); in TEST()
126 map.Remove(ids_in_iteration_order[1]); in TEST()
131 map.Remove(ids_in_iteration_order[3]); in TEST()
136 map.Remove(ids_in_iteration_order[0]); in TEST()
146 EXPECT_EQ(0, map.iteration_depth()); in TEST()
150 IDMap<TestObject> map; in TEST() local
156 map.Add(&obj1); in TEST()
157 map.Add(&obj2); in TEST()
158 map.Add(&obj3); in TEST()
160 EXPECT_EQ(0, map.iteration_depth()); in TEST()
163 IDMap<TestObject>::const_iterator iter1(&map); in TEST()
164 EXPECT_EQ(1, map.iteration_depth()); in TEST()
169 EXPECT_EQ(2, map.iteration_depth()); in TEST()
174 EXPECT_EQ(0, map.iteration_depth()); in TEST()
178 IDMap<TestObject> map; in TEST() local
184 map.Add(&obj1); in TEST()
185 map.Add(&obj2); in TEST()
186 map.Add(&obj3); in TEST()
188 EXPECT_EQ(0, map.iteration_depth()); in TEST()
191 IDMap<TestObject>::const_iterator iter1(&map); in TEST()
192 EXPECT_EQ(1, map.iteration_depth()); in TEST()
194 IDMap<TestObject>::const_iterator iter2(&map); in TEST()
195 EXPECT_EQ(2, map.iteration_depth()); in TEST()
199 EXPECT_EQ(2, map.iteration_depth()); in TEST()
204 EXPECT_EQ(0, map.iteration_depth()); in TEST()
208 IDMap<TestObject> map; in TEST() local
214 map.Add(&obj[i]); in TEST()
220 for (IDMap<TestObject>::const_iterator iter(&map); in TEST()
228 for (IDMap<TestObject>::const_iterator iter(&map); in TEST()
238 map.Clear(); in TEST()
239 EXPECT_TRUE(map.IsEmpty()); in TEST()
240 EXPECT_EQ(0U, map.size()); in TEST()
249 EXPECT_TRUE(map.IsEmpty()); in TEST()
250 EXPECT_EQ(0U, map.size()); in TEST()
361 IDMap<TestObject, IDMapExternalPointer, int64_t> map; in TEST() local
365 map.AddWithID(&obj1, kId1); in TEST()
366 EXPECT_EQ(&obj1, map.Lookup(kId1)); in TEST()
368 IDMap<TestObject, IDMapExternalPointer, int64_t>::const_iterator iter(&map); in TEST()
375 map.Remove(kId1); in TEST()
376 EXPECT_TRUE(map.IsEmpty()); in TEST()