diff options
author | 2020-08-02 21:58:26 +0200 | |
---|---|---|
committer | 2020-08-04 10:18:37 +0200 | |
commit | 259afa5353de2d799829ff85dde7194a6e119ddc (patch) | |
tree | c09f2e763a0e9f54fb366b91ec697f42acfde988 /test/configparser.cpp | |
parent | 08f485903867744cedc3f0382903865057cb9e70 (diff) | |
download | newsboat-259afa5353de2d799829ff85dde7194a6e119ddc.tar.gz newsboat-259afa5353de2d799829ff85dde7194a6e119ddc.tar.zst newsboat-259afa5353de2d799829ff85dde7194a6e119ddc.zip |
Store config handlers as non-nullable references
Diffstat (limited to 'test/configparser.cpp')
-rw-r--r-- | test/configparser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/configparser.cpp b/test/configparser.cpp index b80ed5e7..a0fd4973 100644 --- a/test/configparser.cpp +++ b/test/configparser.cpp @@ -53,7 +53,7 @@ TEST_CASE("evaluate_backticks replaces command in backticks with its output", SECTION("commands with space are evaluated by backticks") { ConfigParser cfgparser; KeyMap keys(KM_NEWSBOAT); - cfgparser.register_handler("bind-key", &keys); + cfgparser.register_handler("bind-key", keys); REQUIRE_NOTHROW(cfgparser.parse("data/config-space-backticks")); REQUIRE(keys.get_operation("s", "feedlist") == OP_SORT); } @@ -91,7 +91,7 @@ TEST_CASE("\"unbind-key -a\" removes all key bindings", "[ConfigParser]") SECTION("In all contexts by default") { KeyMap keys(KM_NEWSBOAT); - cfgparser.register_handler("unbind-key", &keys); + cfgparser.register_handler("unbind-key", keys); cfgparser.parse("data/config-unbind-all"); for (int i = OP_QUIT; i < OP_NB_MAX; ++i) { @@ -104,7 +104,7 @@ TEST_CASE("\"unbind-key -a\" removes all key bindings", "[ConfigParser]") SECTION("For a specific context") { KeyMap keys(KM_NEWSBOAT); - cfgparser.register_handler("unbind-key", &keys); + cfgparser.register_handler("unbind-key", keys); cfgparser.parse("data/config-unbind-all-context"); INFO("it doesn't affect the help dialog"); |