forked from TartanLlama/expected
More testing
This commit is contained in:
@@ -18,6 +18,18 @@ TEST_CASE("Constructors", "[constructors]") {
|
||||
REQUIRE(e == 0);
|
||||
}
|
||||
|
||||
{
|
||||
tl::expected<int,int> e = tl::make_unexpected(0);
|
||||
REQUIRE(!e);
|
||||
REQUIRE(e.error() == 0);
|
||||
}
|
||||
|
||||
{
|
||||
tl::expected<int,int> e (tl::unexpect, 0);
|
||||
REQUIRE(!e);
|
||||
REQUIRE(e.error() == 0);
|
||||
}
|
||||
|
||||
{
|
||||
tl::expected<int,int> e (tl::in_place, 42);
|
||||
REQUIRE(e);
|
||||
|
||||
Reference in New Issue
Block a user