More testing

This commit is contained in:
Simon Brand
2017-11-27 14:48:16 +00:00
parent f2152f8e54
commit afdacc1ba3
7 changed files with 190 additions and 4 deletions

View File

@@ -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);