Lines Matching refs:Map
81 T Map; member in __anon07952c110111::DenseMapTest
113 EXPECT_EQ(0u, this->Map.size()); in TYPED_TEST()
114 EXPECT_TRUE(this->Map.empty()); in TYPED_TEST()
117 EXPECT_TRUE(this->Map.begin() == this->Map.end()); in TYPED_TEST()
120 EXPECT_FALSE(this->Map.count(this->getKey())); in TYPED_TEST()
121 EXPECT_TRUE(this->Map.find(this->getKey()) == this->Map.end()); in TYPED_TEST()
123 this->Map.lookup(this->getKey())); in TYPED_TEST()
128 const TypeParam &ConstMap = this->Map; in TYPED_TEST()
136 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
139 EXPECT_EQ(1u, this->Map.size()); in TYPED_TEST()
140 EXPECT_FALSE(this->Map.begin() == this->Map.end()); in TYPED_TEST()
141 EXPECT_FALSE(this->Map.empty()); in TYPED_TEST()
144 typename TypeParam::iterator it = this->Map.begin(); in TYPED_TEST()
148 EXPECT_TRUE(it == this->Map.end()); in TYPED_TEST()
151 EXPECT_TRUE(this->Map.count(this->getKey())); in TYPED_TEST()
152 EXPECT_TRUE(this->Map.find(this->getKey()) == this->Map.begin()); in TYPED_TEST()
153 EXPECT_EQ(this->getValue(), this->Map.lookup(this->getKey())); in TYPED_TEST()
154 EXPECT_EQ(this->getValue(), this->Map[this->getKey()]); in TYPED_TEST()
159 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
160 this->Map.clear(); in TYPED_TEST()
162 EXPECT_EQ(0u, this->Map.size()); in TYPED_TEST()
163 EXPECT_TRUE(this->Map.empty()); in TYPED_TEST()
164 EXPECT_TRUE(this->Map.begin() == this->Map.end()); in TYPED_TEST()
169 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
170 this->Map.erase(this->Map.begin()); in TYPED_TEST()
172 EXPECT_EQ(0u, this->Map.size()); in TYPED_TEST()
173 EXPECT_TRUE(this->Map.empty()); in TYPED_TEST()
174 EXPECT_TRUE(this->Map.begin() == this->Map.end()); in TYPED_TEST()
179 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
180 this->Map.erase(this->getKey()); in TYPED_TEST()
182 EXPECT_EQ(0u, this->Map.size()); in TYPED_TEST()
183 EXPECT_TRUE(this->Map.empty()); in TYPED_TEST()
184 EXPECT_TRUE(this->Map.begin() == this->Map.end()); in TYPED_TEST()
189 this->Map.insert(std::make_pair(this->getKey(), this->getValue())); in TYPED_TEST()
190 EXPECT_EQ(1u, this->Map.size()); in TYPED_TEST()
191 EXPECT_EQ(this->getValue(), this->Map[this->getKey()]); in TYPED_TEST()
196 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
197 TypeParam copyMap(this->Map); in TYPED_TEST()
206 this->Map[this->getKey(Key)] = this->getValue(Key); in TYPED_TEST()
207 TypeParam copyMap(this->Map); in TYPED_TEST()
216 TypeParam copyMap(this->Map); in TYPED_TEST()
224 this->Map[this->getKey(Key)] = this->getValue(Key); in TYPED_TEST()
225 this->Map.clear(); in TYPED_TEST()
226 TypeParam copyMap(this->Map); in TYPED_TEST()
233 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
234 TypeParam copyMap = this->Map; in TYPED_TEST()
247 this->Map[this->getKey(Key)] = this->getValue(Key); in TYPED_TEST()
248 TypeParam copyMap = this->Map; in TYPED_TEST()
263 this->Map[this->getKey()] = this->getValue(); in TYPED_TEST()
266 this->Map.swap(otherMap); in TYPED_TEST()
267 EXPECT_EQ(0u, this->Map.size()); in TYPED_TEST()
268 EXPECT_TRUE(this->Map.empty()); in TYPED_TEST()
272 this->Map.swap(otherMap); in TYPED_TEST()
275 EXPECT_EQ(1u, this->Map.size()); in TYPED_TEST()
276 EXPECT_EQ(this->getValue(), this->Map[this->getKey()]); in TYPED_TEST()
280 this->Map[this->getKey(i)] = this->getValue(i); in TYPED_TEST()
282 this->Map.swap(otherMap); in TYPED_TEST()
283 EXPECT_EQ(0u, this->Map.size()); in TYPED_TEST()
284 EXPECT_TRUE(this->Map.empty()); in TYPED_TEST()
289 this->Map.swap(otherMap); in TYPED_TEST()
292 EXPECT_EQ(100u, this->Map.size()); in TYPED_TEST()
294 EXPECT_EQ(this->getValue(i), this->Map[this->getKey(i)]); in TYPED_TEST()
307 this->Map[this->getKey(i)] = this->getValue(i); in TYPED_TEST()
311 for (typename TypeParam::iterator it = this->Map.begin(); in TYPED_TEST()
312 it != this->Map.end(); ++it) in TYPED_TEST()
323 typename TypeParam::iterator it = this->Map.begin(); in TYPED_TEST()
383 DenseMap<int, CountCopyAndMove> Map; in TEST() local
385 Map.reserve(1); in TEST()
386 unsigned MemorySize = Map.getMemorySize(); in TEST()
390 Map.insert(std::pair<int, CountCopyAndMove>(std::piecewise_construct, in TEST()
394 EXPECT_EQ(MemorySize, Map.getMemorySize()); in TEST()
401 Map.insert(std::pair<int, CountCopyAndMove>( in TEST()
406 EXPECT_NE(MemorySize, Map.getMemorySize()); in TEST()
423 DenseMap<int, CountCopyAndMove> Map(Size); in TEST() local
424 unsigned MemorySize = Map.getMemorySize(); in TEST()
428 Map.insert(std::pair<int, CountCopyAndMove>(std::piecewise_construct, in TEST()
432 EXPECT_EQ(MemorySize, Map.getMemorySize()); in TEST()
450 DenseMap<int, CountCopyAndMove> Map(Values.begin(), Values.end()); in TEST() local
466 DenseMap<int, CountCopyAndMove> Map; in TEST() local
467 Map.reserve(Size); in TEST()
468 unsigned MemorySize = Map.getMemorySize(); in TEST()
472 Map.insert(std::pair<int, CountCopyAndMove>(std::piecewise_construct, in TEST()
476 EXPECT_EQ(MemorySize, Map.getMemorySize()); in TEST()
620 DenseMap<int, std::unique_ptr<int>> Map; in TEST() local
622 auto Try1 = Map.try_emplace(0, new int(1)); in TEST()
624 auto Try2 = Map.try_emplace(0, std::move(P)); in TEST()
633 DenseMap<int *, int> Map; in TEST() local
637 Map.insert({B, 0}); in TEST()
638 EXPECT_EQ(Map.count(B), 1u); in TEST()
639 EXPECT_EQ(Map.count(C), 1u); in TEST()
640 EXPECT_NE(Map.find(B), Map.end()); in TEST()
641 EXPECT_NE(Map.find(C), Map.end()); in TEST()
650 DenseMap<IncompleteStruct *, int> Map; in TEST() local
655 Map.insert({K1, 1}); in TEST()
656 Map.insert({K2, 2}); in TEST()
657 Map.insert({K3, 3}); in TEST()
658 EXPECT_EQ(Map.count(K1), 1u); in TEST()
659 EXPECT_EQ(Map[K1], 1); in TEST()
660 EXPECT_EQ(Map[K2], 2); in TEST()
661 EXPECT_EQ(Map[K3], 3); in TEST()
662 Map.clear(); in TEST()
663 EXPECT_EQ(Map.find(K1), Map.end()); in TEST()
664 EXPECT_EQ(Map.find(K2), Map.end()); in TEST()
665 EXPECT_EQ(Map.find(K3), Map.end()); in TEST()
696 DenseMap<B, int> Map; in TEST() local
698 Map.insert({Keys[0], 1}); in TEST()
699 Map.insert({Keys[1], 2}); in TEST()
700 Map.insert({Keys[2], 3}); in TEST()
701 EXPECT_EQ(Map.count(Keys[0]), 1u); in TEST()
702 EXPECT_EQ(Map[Keys[0]], 1); in TEST()
703 EXPECT_EQ(Map[Keys[1]], 2); in TEST()
704 EXPECT_EQ(Map[Keys[2]], 3); in TEST()
705 Map.clear(); in TEST()
706 EXPECT_EQ(Map.find(Keys[0]), Map.end()); in TEST()
707 EXPECT_EQ(Map.find(Keys[1]), Map.end()); in TEST()
708 EXPECT_EQ(Map.find(Keys[2]), Map.end()); in TEST()