mirror of
https://github.com/TartanLlama/expected.git
synced 2025-08-01 01:44:30 +02:00
Add tests for tl::unexpected guide
This commit is contained in:
@@ -159,4 +159,11 @@ TEST_CASE("Issue 122", "[issues.122]") {
|
||||
tl::expected<move_tracker, int> res;
|
||||
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
|
Reference in New Issue
Block a user