More tests

This commit is contained in:
Simon Brand
2017-12-18 09:56:36 +00:00
parent c4e3b3ee14
commit 8c3f042b12
2 changed files with 3 additions and 1 deletions

View File

@ -122,7 +122,7 @@ TEST_CASE("Monadic operations", "[monadic]") {
// callable which returns a reference
tl::optional<int> o38 = 42;
auto o38r = o38.map([](int& i) -> const int& { return i; });
auto o38r = o38.map([](int &i) -> const int & { return i; });
REQUIRE(o38r);
REQUIRE(*o38r == 42);
}

View File

@ -41,4 +41,6 @@ TEST_CASE("Make optional", "[make_optional]") {
auto i = 42;
auto o6 = tl::make_optional<int&>(i);
REQUIRE((std::is_same<decltype(o6), tl::optional<int&>>::value));
REQUIRE(o6);
REQUIRE(*o6 == 42);
}