Lines Matching refs:Map
105 T Map; member in __anon65fcc02b0111::DenseMapTest
133 EXPECT_EQ(0u, this->Map.size()); in TYPED_TEST()
134 EXPECT_TRUE(this->Map.empty()); in TYPED_TEST()
137 EXPECT_FALSE(this->Map.count(this->getKey())); in TYPED_TEST()
138 EXPECT_EQ(nullptr, this->Map.find(this->getKey())); in TYPED_TEST()
140 this->Map.lookup(this->getKey())); in TYPED_TEST()
145 const TypeParam &ConstMap = this->Map; in TYPED_TEST()
152 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
155 EXPECT_EQ(1u, this->Map.size()); in TYPED_TEST()
156 EXPECT_FALSE(this->Map.empty()); in TYPED_TEST()
159 EXPECT_TRUE(this->Map.count(this->getKey())); in TYPED_TEST()
160 EXPECT_NE(nullptr, this->Map.find(this->getKey())); in TYPED_TEST()
161 EXPECT_EQ(this->getValue(), this->Map.lookup(this->getKey())); in TYPED_TEST()
162 EXPECT_EQ(this->getValue(), this->Map[this->getKey()]); in TYPED_TEST()
167 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
168 this->Map.clear(); in TYPED_TEST()
170 EXPECT_EQ(0u, this->Map.size()); in TYPED_TEST()
171 EXPECT_TRUE(this->Map.empty()); in TYPED_TEST()
176 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
177 this->Map.erase(this->Map.find(this->getKey())); in TYPED_TEST()
179 EXPECT_EQ(0u, this->Map.size()); in TYPED_TEST()
180 EXPECT_TRUE(this->Map.empty()); in TYPED_TEST()
185 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
186 this->Map.erase(this->getKey()); in TYPED_TEST()
188 EXPECT_EQ(0u, this->Map.size()); in TYPED_TEST()
189 EXPECT_TRUE(this->Map.empty()); in TYPED_TEST()
194 this->Map.insert( in TYPED_TEST()
196 EXPECT_EQ(1u, this->Map.size()); in TYPED_TEST()
197 EXPECT_EQ(this->getValue(), this->Map[this->getKey()]); in TYPED_TEST()
202 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
203 TypeParam copyMap(this->Map); in TYPED_TEST()
212 this->Map[this->getKey(Key)] = this->getValue(Key); in TYPED_TEST()
213 TypeParam copyMap(this->Map); in TYPED_TEST()
222 TypeParam copyMap(this->Map); in TYPED_TEST()
230 this->Map[this->getKey(Key)] = this->getValue(Key); in TYPED_TEST()
231 this->Map.clear(); in TYPED_TEST()
232 TypeParam copyMap(this->Map); in TYPED_TEST()
239 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
240 TypeParam copyMap = this->Map; in TYPED_TEST()
253 this->Map[this->getKey(Key)] = this->getValue(Key); in TYPED_TEST()
254 TypeParam copyMap = this->Map; in TYPED_TEST()
269 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
272 this->Map.swap(otherMap); in TYPED_TEST()
273 EXPECT_EQ(0u, this->Map.size()); in TYPED_TEST()
274 EXPECT_TRUE(this->Map.empty()); in TYPED_TEST()
278 this->Map.swap(otherMap); in TYPED_TEST()
281 EXPECT_EQ(1u, this->Map.size()); in TYPED_TEST()
282 EXPECT_EQ(this->getValue(), this->Map[this->getKey()]); in TYPED_TEST()
285 for (int i = 0; i < 100; ++i) this->Map[this->getKey(i)] = this->getValue(i); in TYPED_TEST()
287 this->Map.swap(otherMap); in TYPED_TEST()
288 EXPECT_EQ(0u, this->Map.size()); in TYPED_TEST()
289 EXPECT_TRUE(this->Map.empty()); in TYPED_TEST()
294 this->Map.swap(otherMap); in TYPED_TEST()
297 EXPECT_EQ(100u, this->Map.size()); in TYPED_TEST()
299 EXPECT_EQ(this->getValue(i), this->Map[this->getKey(i)]); in TYPED_TEST()
312 this->Map[this->getKey(i)] = this->getValue(i); in TYPED_TEST()
316 this->Map.forEach([&](const typename TypeParam::value_type &kv) { in TYPED_TEST()
375 DenseMap<int, CountCopyAndMove> Map; in TEST() local
377 Map.reserve(1); in TEST()
378 unsigned MemorySize = Map.getMemorySize(); in TEST()
384 Map.insert(move(KV)); in TEST()
387 EXPECT_EQ(MemorySize, Map.getMemorySize()); in TEST()
396 Map.insert(move(KV)); in TEST()
398 EXPECT_NE(MemorySize, Map.getMemorySize()); in TEST()
414 DenseMap<int, CountCopyAndMove> Map(Size); in TEST() local
415 unsigned MemorySize = Map.getMemorySize(); in TEST()
421 Map.insert(move(KV)); in TEST()
424 EXPECT_EQ(MemorySize, Map.getMemorySize()); in TEST()
441 DenseMap<int, CountCopyAndMove> Map(Values.begin(), Values.end()); in TEST() local
456 DenseMap<int, CountCopyAndMove> Map; in TEST() local
457 Map.reserve(Size); in TEST()
458 unsigned MemorySize = Map.getMemorySize(); in TEST()
464 Map.insert(move(KV)); in TEST()
467 EXPECT_EQ(MemorySize, Map.getMemorySize()); in TEST()
517 DenseMap<int, std::unique_ptr<int>> Map; in TEST() local
519 auto Try1 = Map.try_emplace(0, new int(1)); in TEST()
521 auto Try2 = Map.try_emplace(0, std::move(P)); in TEST()
533 DenseMap<IncompleteStruct *, int> Map; in TEST() local
538 Map.insert({K1, 1}); in TEST()
539 Map.insert({K2, 2}); in TEST()
540 Map.insert({K3, 3}); in TEST()
541 EXPECT_EQ(Map.count(K1), 1u); in TEST()
542 EXPECT_EQ(Map[K1], 1); in TEST()
543 EXPECT_EQ(Map[K2], 2); in TEST()
544 EXPECT_EQ(Map[K3], 3); in TEST()
545 Map.clear(); in TEST()
546 EXPECT_EQ(nullptr, Map.find(K1)); in TEST()
547 EXPECT_EQ(nullptr, Map.find(K2)); in TEST()
548 EXPECT_EQ(nullptr, Map.find(K3)); in TEST()