Lines Matching refs:SmallMap

30 using ftl::SmallMap;
33 TEST(SmallMap, Example) { in TEST() argument
34 ftl::SmallMap<int, std::string, 3> map; in TEST()
56 EXPECT_EQ(map, SmallMap(ftl::init::map(-1, "xyz"sv)(0, "nil"sv)(42, "???"sv)(123, "abc"sv))); in TEST()
59 TEST(SmallMap, Construct) { in TEST() argument
62 SmallMap<int, std::string, 2> map; in TEST()
69 SmallMap<int, std::string, 5> map = in TEST()
76 EXPECT_EQ(map, SmallMap(ftl::init::map(123, "abc"sv)(456, "def"sv)(789, "ghi"sv))); in TEST()
80 SmallMap<int, std::string, 5> map = in TEST()
87 EXPECT_EQ(map, SmallMap(ftl::init::map(42, "???"sv)(123, "abc"sv)(-1, ""sv))); in TEST()
91 SmallMap map = ftl::init::map<int, std::string>(123, "abc")(-1)(42, 3u, '?'); in TEST()
93 static_assert(std::is_same_v<decltype(map), SmallMap<int, std::string, 3>>); in TEST()
98 EXPECT_EQ(map, SmallMap(ftl::init::map(-1, ""sv)(42, "???"sv)(123, "abc"sv))); in TEST()
102 TEST(SmallMap, Assign) { in TEST() argument
105 SmallMap map1 = ftl::init::map<char, std::string>('k', "kilo")('M', "mega")('G', "giga"); in TEST()
106 const SmallMap map2 = ftl::init::map('T', "tera"s)('P', "peta"s); in TEST()
113 SmallMap map1 = ftl::init::map<char, std::string>('M', "mega")('G', "giga"); in TEST()
114 const SmallMap map2 = ftl::init::map('T', "tera"sv)('P', "peta"sv); in TEST()
121 SmallMap<char, std::string, 0> map1 = ftl::init::map('M', "mega")('G', "giga"); in TEST()
122 const SmallMap<char, std::string, 0> map2 = ftl::init::map('T', "tera")('P', "peta"); in TEST()
129 TEST(SmallMap, UniqueKeys) { in TEST() argument
132 const SmallMap map = ftl::init::map<int, float>(1)(2)(3)(2)(3)(1)(3)(2)(1); in TEST()
142 const SmallMap map = ftl::init::map('a', 'A')( in TEST()
153 TEST(SmallMap, Get) { in TEST() argument
156 const SmallMap map = ftl::init::map('a', 'A')('b', 'B')('c', 'C'); in TEST()
167 SmallMap map = ftl::init::map('a', 'A')('b', 'B')('c', 'C'); in TEST()
179 const SmallMap map = ftl::init::map('a', 'x')('b', 'y')('c', 'z'); in TEST()
184 SmallMap map = ftl::init::map('a', 'x')('b', 'y')('c', 'z'); in TEST()
188 EXPECT_EQ(map, SmallMap(ftl::init::map('c', 'Z')('b', 'y')('a', 'x'))); in TEST()
204 SmallMap<int, std::string, TestFixture::kCapacity> map; in TYPED_TEST()
246 EXPECT_EQ(map, SmallMap(ftl::init::map(-1, ""s)(42, "???"s)(123, "abc"s)(999, "xyz"s))); in TYPED_TEST()
263 SmallMap<int, String, TestFixture::kCapacity> map = ftl::init::map(1, "a")(2, "B"); in TYPED_TEST()
308 EXPECT_EQ(map, SmallMap(ftl::init::map(4, "d"s)(3, "c"s)(2, "b"s)(1, "a"s))); in TYPED_TEST()
312 SmallMap<int, String, TestFixture::kCapacity> map = ftl::init::map(1, "a")(2, "B"); in TYPED_TEST()
359 EXPECT_EQ(map, SmallMap(ftl::init::map(5, "e"s)(4, "d"s)(3, "c"s)(2, "b"s)(1, "a"s))); in TYPED_TEST()
362 TEST(SmallMap, Erase) { in TEST() argument
364 SmallMap map = ftl::init::map(1, '1')(2, '2')(3, '3')(4, '4'); in TEST()
370 EXPECT_EQ(map, SmallMap(ftl::init::map(1, '1')(3, '3')(4, '4'))); in TEST()
373 EXPECT_EQ(map, SmallMap(ftl::init::map(3, '3')(4, '4'))); in TEST()
376 EXPECT_EQ(map, SmallMap(ftl::init::map(3, '3'))); in TEST()
385 SmallMap map = ftl::init::map(1, '1')(2, '2')(3, '3'); in TEST()
392 EXPECT_EQ(map, SmallMap(ftl::init::map(1, '1')(3, '3')(4, '4'))); in TEST()
395 EXPECT_EQ(map, SmallMap(ftl::init::map(3, '3')(4, '4'))); in TEST()
398 EXPECT_EQ(map, SmallMap(ftl::init::map(3, '3'))); in TEST()
408 TEST(SmallMap, Clear) { in TEST() argument
409 SmallMap map = ftl::init::map(1, '1')(2, '2')(3, '3'); in TEST()
425 TEST(SmallMap, KeyEqual) { in TEST() argument
430 SmallMap<int, char, 1, KeyEqual> map; in TEST()
442 EXPECT_EQ(map, SmallMap(ftl::init::map<int, char, KeyEqual>(1, '1')(2, '2'))); in TEST()