summaryrefslogtreecommitdiff
path: root/src/utils/checkutils_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-03 00:22:11 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-03 00:22:11 +0300
commit972a7923355b87f7570bae37306d9ec8121c86da (patch)
tree332cac6474d3c33c8e032d21b32f293b69921a5d /src/utils/checkutils_unittest.cc
parent9ffe81e93fe8561d01a4985e565d2f9664431338 (diff)
downloadmanaplus-972a7923355b87f7570bae37306d9ec8121c86da.tar.gz
manaplus-972a7923355b87f7570bae37306d9ec8121c86da.tar.bz2
manaplus-972a7923355b87f7570bae37306d9ec8121c86da.tar.xz
manaplus-972a7923355b87f7570bae37306d9ec8121c86da.zip
Add functions failFalse and failTrue and tests.
Diffstat (limited to 'src/utils/checkutils_unittest.cc')
-rw-r--r--src/utils/checkutils_unittest.cc12
1 files changed, 12 insertions, 0 deletions
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);
}