summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-19 17:12:14 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-19 18:39:45 +0300
commit886794b8a1ff563f9d5c9952935a9b330b652a14 (patch)
tree96f10f7473bdf3efd1d9fb74a28fb1fd31582fb5 /src/utils
parenta407b7c3660628cb3a6b96b3f5e61bb59c9958d2 (diff)
downloadmanaplus-886794b8a1ff563f9d5c9952935a9b330b652a14.tar.gz
manaplus-886794b8a1ff563f9d5c9952935a9b330b652a14.tar.bz2
manaplus-886794b8a1ff563f9d5c9952935a9b330b652a14.tar.xz
manaplus-886794b8a1ff563f9d5c9952935a9b330b652a14.zip
Fix some warnings in unit tests.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/checkutils_unittest.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/utils/checkutils_unittest.cc b/src/utils/checkutils_unittest.cc
index 4dbc23062..644752306 100644
--- a/src/utils/checkutils_unittest.cc
+++ b/src/utils/checkutils_unittest.cc
@@ -104,24 +104,33 @@ TEST_CASE("CheckUtils", "")
SECTION("failFalse")
{
- REQUIRE_THROWS(failFalse(false) == false);
+PRAGMA4(GCC diagnostic push)
+PRAGMA4(GCC diagnostic ignored "-Wunused-value")
+ REQUIRE_THROWS(failFalse(false));
REQUIRE(failFalse(true) == true);
- REQUIRE_THROWS(reportFalse(false) == false);
+ REQUIRE_THROWS(reportFalse(false));
REQUIRE(reportFalse(true) == true);
+PRAGMA4(GCC diagnostic pop)
}
SECTION("failTrue")
{
+PRAGMA4(GCC diagnostic push)
+PRAGMA4(GCC diagnostic ignored "-Wunused-value")
REQUIRE(failTrue(false) == false);
- REQUIRE_THROWS(failTrue(true) == true);
+ REQUIRE_THROWS(failTrue(true));
REQUIRE(reportTrue(false) == false);
- REQUIRE_THROWS(reportTrue(true) == true);
+ REQUIRE_THROWS(reportTrue(true));
+PRAGMA4(GCC diagnostic pop)
}
SECTION("failAlways")
{
- REQUIRE_THROWS(testFailAlways1() == true);
- REQUIRE_THROWS(testFailAlways2() == true);
+PRAGMA4(GCC diagnostic push)
+PRAGMA4(GCC diagnostic ignored "-Wunused-value")
+ REQUIRE_THROWS(testFailAlways1());
+ REQUIRE_THROWS(testFailAlways2());
+PRAGMA4(GCC diagnostic pop)
}
SECTION("returnFalseV")