From 8f0b5f3b08561e3010c4e2df94a2eec6521f59c0 Mon Sep 17 00:00:00 2001 From: Dawid Drozd Date: Tue, 15 Aug 2017 21:48:09 +0200 Subject: [PATCH] Fix test --- test/eventbus/NotifierTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/eventbus/NotifierTest.cpp b/test/eventbus/NotifierTest.cpp index 478e487..e1b8dde 100644 --- a/test/eventbus/NotifierTest.cpp +++ b/test/eventbus/NotifierTest.cpp @@ -114,6 +114,7 @@ TEST_CASE("eventbus/EventBus type conversion", "Check for type conversion") { Dexode::Event event{"event1"}; _token = bus.listen(event, std::bind(&Example::onEvent1, this, std::placeholders::_1)); + // Using bind we can convert types bus.listen(_token, event, std::bind(&Example::onEvent2, this, std::placeholders::_1)); } @@ -143,5 +144,5 @@ TEST_CASE("eventbus/EventBus type conversion", "Check for type conversion") REQUIRE(ex.calledEvent2 == 0); bus.notify("event1", 2); REQUIRE(ex.calledEvent1 == 1); - REQUIRE(ex.calledEvent2 == 0); + REQUIRE(ex.calledEvent2 == 1);//Lookout for std::bind! }