Lines Matching full:mv

43   MapVector<int, int> MV;  in TEST()  local
46 R = MV.insert(std::make_pair(1, 2)); in TEST()
47 ASSERT_EQ(R.first, MV.begin()); in TEST()
52 R = MV.insert(std::make_pair(1, 3)); in TEST()
53 ASSERT_EQ(R.first, MV.begin()); in TEST()
58 R = MV.insert(std::make_pair(4, 5)); in TEST()
59 ASSERT_NE(R.first, MV.end()); in TEST()
64 EXPECT_EQ(MV.size(), 2u); in TEST()
65 EXPECT_EQ(MV[1], 2); in TEST()
66 EXPECT_EQ(MV[4], 5); in TEST()
68 MV.pop_back(); in TEST()
69 EXPECT_EQ(MV.size(), 1u); in TEST()
70 EXPECT_EQ(MV[1], 2); in TEST()
72 R = MV.insert(std::make_pair(4, 7)); in TEST()
73 ASSERT_NE(R.first, MV.end()); in TEST()
78 EXPECT_EQ(MV.size(), 2u); in TEST()
79 EXPECT_EQ(MV[1], 2); in TEST()
80 EXPECT_EQ(MV[4], 7); in TEST()
84 MapVector<int, int> MV; in TEST() local
86 MV.insert(std::make_pair(1, 2)); in TEST()
87 MV.insert(std::make_pair(3, 4)); in TEST()
88 MV.insert(std::make_pair(5, 6)); in TEST()
89 ASSERT_EQ(MV.size(), 3u); in TEST()
91 MV.erase(MV.find(1)); in TEST()
92 ASSERT_EQ(MV.size(), 2u); in TEST()
93 ASSERT_EQ(MV.find(1), MV.end()); in TEST()
94 ASSERT_EQ(MV[3], 4); in TEST()
95 ASSERT_EQ(MV[5], 6); in TEST()
97 ASSERT_EQ(MV.erase(3), 1u); in TEST()
98 ASSERT_EQ(MV.size(), 1u); in TEST()
99 ASSERT_EQ(MV.find(3), MV.end()); in TEST()
100 ASSERT_EQ(MV[5], 6); in TEST()
102 ASSERT_EQ(MV.erase(79), 0u); in TEST()
103 ASSERT_EQ(MV.size(), 1u); in TEST()
107 MapVector<int, int> MV; in TEST() local
109 MV.insert(std::make_pair(1, 11)); in TEST()
110 MV.insert(std::make_pair(2, 12)); in TEST()
111 MV.insert(std::make_pair(3, 13)); in TEST()
112 MV.insert(std::make_pair(4, 14)); in TEST()
113 MV.insert(std::make_pair(5, 15)); in TEST()
114 MV.insert(std::make_pair(6, 16)); in TEST()
115 ASSERT_EQ(MV.size(), 6u); in TEST()
117 MV.remove_if([](const std::pair<int, int> &Val) { return Val.second % 2; }); in TEST()
118 ASSERT_EQ(MV.size(), 3u); in TEST()
119 ASSERT_EQ(MV.find(1), MV.end()); in TEST()
120 ASSERT_EQ(MV.find(3), MV.end()); in TEST()
121 ASSERT_EQ(MV.find(5), MV.end()); in TEST()
122 ASSERT_EQ(MV[2], 12); in TEST()
123 ASSERT_EQ(MV[4], 14); in TEST()
124 ASSERT_EQ(MV[6], 16); in TEST()
128 MapVector<int, int> MV; in TEST() local
130 MV.insert(std::make_pair(1, 11)); in TEST()
131 MV.insert(std::make_pair(2, 12)); in TEST()
132 MV.insert(std::make_pair(3, 13)); in TEST()
133 MV.insert(std::make_pair(4, 14)); in TEST()
134 MV.insert(std::make_pair(5, 15)); in TEST()
135 MV.insert(std::make_pair(6, 16)); in TEST()
136 ASSERT_EQ(MV.size(), 6u); in TEST()
139 for (auto P : make_range(MV.begin(), MV.end())) { in TEST()
145 for (auto P : make_range(MV.rbegin(), MV.rend())) { in TEST()
152 SmallMapVector<int, int, 32> MV; in TEST() local
155 R = MV.insert(std::make_pair(1, 2)); in TEST()
156 ASSERT_EQ(R.first, MV.begin()); in TEST()
161 R = MV.insert(std::make_pair(1, 3)); in TEST()
162 ASSERT_EQ(R.first, MV.begin()); in TEST()
167 R = MV.insert(std::make_pair(4, 5)); in TEST()
168 ASSERT_NE(R.first, MV.end()); in TEST()
173 EXPECT_EQ(MV.size(), 2u); in TEST()
174 EXPECT_EQ(MV[1], 2); in TEST()
175 EXPECT_EQ(MV[4], 5); in TEST()
177 MV.pop_back(); in TEST()
178 EXPECT_EQ(MV.size(), 1u); in TEST()
179 EXPECT_EQ(MV[1], 2); in TEST()
181 R = MV.insert(std::make_pair(4, 7)); in TEST()
182 ASSERT_NE(R.first, MV.end()); in TEST()
187 EXPECT_EQ(MV.size(), 2u); in TEST()
188 EXPECT_EQ(MV[1], 2); in TEST()
189 EXPECT_EQ(MV[4], 7); in TEST()
193 SmallMapVector<int, int, 32> MV; in TEST() local
195 MV.insert(std::make_pair(1, 2)); in TEST()
196 MV.insert(std::make_pair(3, 4)); in TEST()
197 MV.insert(std::make_pair(5, 6)); in TEST()
198 ASSERT_EQ(MV.size(), 3u); in TEST()
200 MV.erase(MV.find(1)); in TEST()
201 ASSERT_EQ(MV.size(), 2u); in TEST()
202 ASSERT_EQ(MV.find(1), MV.end()); in TEST()
203 ASSERT_EQ(MV[3], 4); in TEST()
204 ASSERT_EQ(MV[5], 6); in TEST()
206 ASSERT_EQ(MV.erase(3), 1u); in TEST()
207 ASSERT_EQ(MV.size(), 1u); in TEST()
208 ASSERT_EQ(MV.find(3), MV.end()); in TEST()
209 ASSERT_EQ(MV[5], 6); in TEST()
211 ASSERT_EQ(MV.erase(79), 0u); in TEST()
212 ASSERT_EQ(MV.size(), 1u); in TEST()
216 SmallMapVector<int, int, 32> MV; in TEST() local
218 MV.insert(std::make_pair(1, 11)); in TEST()
219 MV.insert(std::make_pair(2, 12)); in TEST()
220 MV.insert(std::make_pair(3, 13)); in TEST()
221 MV.insert(std::make_pair(4, 14)); in TEST()
222 MV.insert(std::make_pair(5, 15)); in TEST()
223 MV.insert(std::make_pair(6, 16)); in TEST()
224 ASSERT_EQ(MV.size(), 6u); in TEST()
226 MV.remove_if([](const std::pair<int, int> &Val) { return Val.second % 2; }); in TEST()
227 ASSERT_EQ(MV.size(), 3u); in TEST()
228 ASSERT_EQ(MV.find(1), MV.end()); in TEST()
229 ASSERT_EQ(MV.find(3), MV.end()); in TEST()
230 ASSERT_EQ(MV.find(5), MV.end()); in TEST()
231 ASSERT_EQ(MV[2], 12); in TEST()
232 ASSERT_EQ(MV[4], 14); in TEST()
233 ASSERT_EQ(MV[6], 16); in TEST()
237 SmallMapVector<int, int, 32> MV; in TEST() local
239 MV.insert(std::make_pair(1, 11)); in TEST()
240 MV.insert(std::make_pair(2, 12)); in TEST()
241 MV.insert(std::make_pair(3, 13)); in TEST()
242 MV.insert(std::make_pair(4, 14)); in TEST()
243 MV.insert(std::make_pair(5, 15)); in TEST()
244 MV.insert(std::make_pair(6, 16)); in TEST()
245 ASSERT_EQ(MV.size(), 6u); in TEST()
248 for (auto P : make_range(MV.begin(), MV.end())) { in TEST()
254 for (auto P : make_range(MV.rbegin(), MV.rend())) { in TEST()
261 SmallMapVector<int, int, 1> MV; in TEST() local
264 R = MV.insert(std::make_pair(1, 2)); in TEST()
265 ASSERT_EQ(R.first, MV.begin()); in TEST()
270 R = MV.insert(std::make_pair(1, 3)); in TEST()
271 ASSERT_EQ(R.first, MV.begin()); in TEST()
276 R = MV.insert(std::make_pair(4, 5)); in TEST()
277 ASSERT_NE(R.first, MV.end()); in TEST()
282 EXPECT_EQ(MV.size(), 2u); in TEST()
283 EXPECT_EQ(MV[1], 2); in TEST()
284 EXPECT_EQ(MV[4], 5); in TEST()
286 MV.pop_back(); in TEST()
287 EXPECT_EQ(MV.size(), 1u); in TEST()
288 EXPECT_EQ(MV[1], 2); in TEST()
290 R = MV.insert(std::make_pair(4, 7)); in TEST()
291 ASSERT_NE(R.first, MV.end()); in TEST()
296 EXPECT_EQ(MV.size(), 2u); in TEST()
297 EXPECT_EQ(MV[1], 2); in TEST()
298 EXPECT_EQ(MV[4], 7); in TEST()
302 SmallMapVector<int, int, 1> MV; in TEST() local
304 MV.insert(std::make_pair(1, 2)); in TEST()
305 MV.insert(std::make_pair(3, 4)); in TEST()
306 MV.insert(std::make_pair(5, 6)); in TEST()
307 ASSERT_EQ(MV.size(), 3u); in TEST()
309 MV.erase(MV.find(1)); in TEST()
310 ASSERT_EQ(MV.size(), 2u); in TEST()
311 ASSERT_EQ(MV.find(1), MV.end()); in TEST()
312 ASSERT_EQ(MV[3], 4); in TEST()
313 ASSERT_EQ(MV[5], 6); in TEST()
315 ASSERT_EQ(MV.erase(3), 1u); in TEST()
316 ASSERT_EQ(MV.size(), 1u); in TEST()
317 ASSERT_EQ(MV.find(3), MV.end()); in TEST()
318 ASSERT_EQ(MV[5], 6); in TEST()
320 ASSERT_EQ(MV.erase(79), 0u); in TEST()
321 ASSERT_EQ(MV.size(), 1u); in TEST()
325 SmallMapVector<int, int, 1> MV; in TEST() local
327 MV.insert(std::make_pair(1, 11)); in TEST()
328 MV.insert(std::make_pair(2, 12)); in TEST()
329 MV.insert(std::make_pair(3, 13)); in TEST()
330 MV.insert(std::make_pair(4, 14)); in TEST()
331 MV.insert(std::make_pair(5, 15)); in TEST()
332 MV.insert(std::make_pair(6, 16)); in TEST()
333 ASSERT_EQ(MV.size(), 6u); in TEST()
335 MV.remove_if([](const std::pair<int, int> &Val) { return Val.second % 2; }); in TEST()
336 ASSERT_EQ(MV.size(), 3u); in TEST()
337 ASSERT_EQ(MV.find(1), MV.end()); in TEST()
338 ASSERT_EQ(MV.find(3), MV.end()); in TEST()
339 ASSERT_EQ(MV.find(5), MV.end()); in TEST()
340 ASSERT_EQ(MV[2], 12); in TEST()
341 ASSERT_EQ(MV[4], 14); in TEST()
342 ASSERT_EQ(MV[6], 16); in TEST()
346 SmallMapVector<int, int, 1> MV; in TEST() local
348 MV.insert(std::make_pair(1, 11)); in TEST()
349 MV.insert(std::make_pair(2, 12)); in TEST()
350 MV.insert(std::make_pair(3, 13)); in TEST()
351 MV.insert(std::make_pair(4, 14)); in TEST()
352 MV.insert(std::make_pair(5, 15)); in TEST()
353 MV.insert(std::make_pair(6, 16)); in TEST()
354 ASSERT_EQ(MV.size(), 6u); in TEST()
357 for (auto P : make_range(MV.begin(), MV.end())) { in TEST()
363 for (auto P : make_range(MV.rbegin(), MV.rend())) { in TEST()