Lines Matching refs:opt
53 Optional opt = std::optional("test"s); in TEST() local
54 static_assert(std::is_same_v<decltype(opt), Optional<std::string>>); in TEST()
56 ASSERT_TRUE(opt); in TEST()
57 EXPECT_EQ(opt.value(), "test"s); in TEST()
72 Optional opt = 'x'; in TEST() local
73 EXPECT_EQ('z', opt.transform([](char& c) { in TEST()
78 EXPECT_EQ('y', opt); in TEST()
94 Optional opt = "food"s; in TEST() local
95 EXPECT_EQ(ftl::unit, opt.transform(ftl::unit_fn([](std::string& str) { str.pop_back(); }))); in TEST()
96 EXPECT_EQ(opt, "foo"s); in TEST()
132 Optional opt = 'x'; in TEST() local
133 EXPECT_EQ('z', opt.and_then([](char& c) { in TEST()
138 EXPECT_EQ('y', opt); in TEST()
172 const Optional opt = false; in TEST() local
173 EXPECT_EQ(false, opt.or_else([] { return Optional(true); })); in TEST()
179 const Optional<int> opt; in TEST() local
180 EXPECT_EQ(123, opt.or_else([]() -> Optional<int> { return 123; })); in TEST()