From 972a7923355b87f7570bae37306d9ec8121c86da Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 3 May 2016 00:22:11 +0300 Subject: Add functions failFalse and failTrue and tests. --- src/utils/checkutils_unittest.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/utils/checkutils_unittest.cc') diff --git a/src/utils/checkutils_unittest.cc b/src/utils/checkutils_unittest.cc index 2e98daf47..a9b2db798 100644 --- a/src/utils/checkutils_unittest.cc +++ b/src/utils/checkutils_unittest.cc @@ -43,5 +43,17 @@ TEST_CASE("CheckUtils") REQUIRE(reportTrue(true) == true); } + SECTION("failFalse") + { + REQUIRE_THROWS(failFalse(false) == false); + REQUIRE(failFalse(true) == true); + } + + SECTION("failTrue") + { + REQUIRE(failTrue(false) == false); + REQUIRE_THROWS(failTrue(true) == true); + } + delete2(logger); } -- cgit v1.2.3-70-g09d2