summaryrefslogtreecommitdiff
path: root/test/configcontainer.cpp
diff options
context:
space:
mode:
authorGravatar Alexander Batischev <eual.jp@gmail.com> 2023-03-18 20:57:36 +0300
committerGravatar Alexander Batischev <eual.jp@gmail.com> 2023-03-18 21:36:42 +0300
commit00aa491ca0616e3a16474d548bea5ca274b6ab7d (patch)
treea14fc174b05b4dc77f6c1737decaa2f81e8a4f1d /test/configcontainer.cpp
parent536c7cd6610a38897c8d1008eb09009063e29f4d (diff)
downloadnewsboat-00aa491ca0616e3a16474d548bea5ca274b6ab7d.tar.gz
newsboat-00aa491ca0616e3a16474d548bea5ca274b6ab7d.tar.zst
newsboat-00aa491ca0616e3a16474d548bea5ca274b6ab7d.zip
Use proper Catch2 macros to test for true/false
This fixes a cppcheck warning.
Diffstat (limited to '')
-rw-r--r--test/configcontainer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/configcontainer.cpp b/test/configcontainer.cpp
index 5d5f1ffd..b7450759 100644
--- a/test/configcontainer.cpp
+++ b/test/configcontainer.cpp
@@ -202,13 +202,13 @@ TEST_CASE("toggle() inverts the value of a boolean setting",
SECTION("\"true\" becomes \"false\"") {
cfg.set_configvalue(key, "true");
REQUIRE_NOTHROW(cfg.toggle(key));
- REQUIRE(cfg.get_configvalue_as_bool(key) == false);
+ REQUIRE_FALSE(cfg.get_configvalue_as_bool(key));
}
SECTION("\"false\" becomes \"true\"") {
cfg.set_configvalue(key, "false");
REQUIRE_NOTHROW(cfg.toggle(key));
- REQUIRE(cfg.get_configvalue_as_bool(key) == true);
+ REQUIRE(cfg.get_configvalue_as_bool(key));
}
}