From 8c3f042b12301a5346fb2d83a90fa5df7952a0d4 Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Mon, 18 Dec 2017 09:56:36 +0000 Subject: [PATCH] More tests --- tests/extensions.cpp | 2 +- tests/make_optional.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/extensions.cpp b/tests/extensions.cpp index ee5ae30..6712b3e 100644 --- a/tests/extensions.cpp +++ b/tests/extensions.cpp @@ -122,7 +122,7 @@ TEST_CASE("Monadic operations", "[monadic]") { // callable which returns a reference tl::optional 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); } diff --git a/tests/make_optional.cpp b/tests/make_optional.cpp index 0376849..ba44fd9 100644 --- a/tests/make_optional.cpp +++ b/tests/make_optional.cpp @@ -41,4 +41,6 @@ TEST_CASE("Make optional", "[make_optional]") { auto i = 42; auto o6 = tl::make_optional(i); REQUIRE((std::is_same>::value)); + REQUIRE(o6); + REQUIRE(*o6 == 42); }