Add tests for tl::unexpected guide

This commit is contained in:
Sy Brand
2022-11-24 12:23:11 +00:00
parent fb0bd6e79d
commit 4621a489bf

View File

@@ -160,3 +160,10 @@ TEST_CASE("Issue 122", "[issues.122]") {
res.emplace(); // why moved?
REQUIRE(res.value().moved == 0);
}
#ifdef __cpp_deduction_guides
TEST_CASE("Issue 89", "[issues.89]") {
auto s = tl::unexpected("Some string");
REQUIRE(s.value() == "Some string");
}
#endif