Lines Matching refs:ftl
28 const ftl::StaticVector vector = {1, 2, 3}; in TEST()
29 EXPECT_TRUE(ftl::contains(vector, 1)); in TEST()
31 EXPECT_FALSE(ftl::contains(vector, 0)); in TEST()
32 EXPECT_TRUE(ftl::contains(vector, 2)); in TEST()
33 EXPECT_TRUE(ftl::contains(vector, 3)); in TEST()
34 EXPECT_FALSE(ftl::contains(vector, 4)); in TEST()
41 const ftl::StaticVector vector = {"upside"sv, "down"sv, "cake"sv}; in TEST()
42 EXPECT_EQ(ftl::find_if(vector, [](const auto& str) { return str.front() == 'c'; }), "cake"sv); in TEST()
44 const ftl::SmallMap map = ftl::init::map<int, ftl::StaticVector<std::string_view, 3>>( in TEST()
49 EXPECT_EQ(14, ftl::find_if(map, [](const auto& pair) { in TEST()
51 }).transform(ftl::to_key<Map>)); in TEST()
53 const auto opt = ftl::find_if(map, [](const auto& pair) { in TEST()
55 }).transform(ftl::to_mapped_ref<Map>); in TEST()
58 EXPECT_EQ(opt->get(), ftl::StaticVector("tiramisu"sv)); in TEST()
64 const ftl::SmallMap map = ftl::init::map(13, "tiramisu"sv)(14, "upside-down cake"sv); in TEST()
66 map.get(20).or_else(ftl::static_ref<std::string_view>([] { return "???"sv; }))->get()); in TEST()
71 ftl::find_if(map, [](const auto& pair) { return pair.second.front() == 's'; }) in TEST()
72 .transform(ftl::to_mapped_ref<Map>) in TEST()
73 .or_else(ftl::static_ref<std::string_view>([] { return "snow cone"sv; })) in TEST()