We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 287ab60 commit 351a616Copy full SHA for 351a616
1 file changed
tests/Execution/EventSystem.mpp
@@ -95,5 +95,22 @@ export namespace CppUtils::UnitTest::Execution::EventSystem
95
suite.expectCall(expectPingReceived);
96
suite.expectCall(expectPongReceived);
97
});
98
+
99
+ suite.addTest("Multiple subscribers", [&] {
100
+ auto eventSystem = CppUtils::Execution::EventSystem{};
101
+ auto expect1 = ExpectedCall{};
102
+ auto expect2 = ExpectedCall{};
103
104
+ eventSystem.subscribe<"Event">([&expect1](std::nullptr_t) -> void {
105
+ expect1.call();
106
+ });
107
+ eventSystem.subscribe<"Event">([&expect2](std::nullptr_t) -> void {
108
+ expect2.call();
109
110
+ eventSystem.emit<"Event">(nullptr);
111
112
+ suite.expectCall(expect1);
113
+ suite.expectCall(expect2);
114
115
}};
116
}
0 commit comments