@@ -198,21 +198,12 @@ TEST_CASE("Basic message loop" * doctest::test_suite("messaging"))
198198 {
199199 test_filler.write (echo_out);
200200 REQUIRE_THROWS_AS (bp.run (loop_src), messaging::no_handler);
201-
202- const auto counts = bp.get_dispatcher ().retrieve_message_counts ();
203- REQUIRE (counts.empty ());
204201 }
205202
206203 SUBCASE (" Message handlers can finish the loop" )
207204 {
208205 test_filler.write (finish);
209206 REQUIRE (bp.run (loop_src) == 1 );
210-
211- const auto counts = bp.get_dispatcher ().retrieve_message_counts ();
212- REQUIRE (counts.size () == 1 );
213- REQUIRE (counts.find (finish) != counts.end ());
214- REQUIRE (counts.at (finish).messages == 1 );
215- REQUIRE (counts.at (finish).bytes == 0 );
216207 }
217208
218209 SUBCASE (" Message handlers can affect external state" )
@@ -222,15 +213,6 @@ TEST_CASE("Basic message loop" * doctest::test_suite("messaging"))
222213 test_filler.write (finish);
223214 REQUIRE (bp.run (loop_src) == 2 );
224215 REQUIRE (x == new_x);
225-
226- const auto counts = bp.get_dispatcher ().retrieve_message_counts ();
227- REQUIRE (counts.size () == 2 );
228- REQUIRE (counts.find (set_x) != counts.end ());
229- REQUIRE (counts.at (set_x).messages == 1 );
230- REQUIRE (counts.at (set_x).bytes == sizeof (new_x));
231- REQUIRE (counts.find (finish) != counts.end ());
232- REQUIRE (counts.at (finish).messages == 1 );
233- REQUIRE (counts.at (finish).bytes == 0 );
234216 }
235217
236218 SUBCASE (" Message handlers can communicate through the writer" )
@@ -250,15 +232,6 @@ TEST_CASE("Basic message loop" * doctest::test_suite("messaging"))
250232 REQUIRE (data[i] == actual[i]);
251233 }
252234 }) == 1 );
253-
254- const auto counts = bp.get_dispatcher ().retrieve_message_counts ();
255- REQUIRE (counts.size () == 2 );
256- REQUIRE (counts.find (echo) != counts.end ());
257- REQUIRE (counts.at (echo).messages == 1 );
258- REQUIRE (counts.at (echo).bytes == actual.size ());
259- REQUIRE (counts.find (finish) != counts.end ());
260- REQUIRE (counts.at (finish).messages == 1 );
261- REQUIRE (counts.at (finish).bytes == 0 );
262235 }
263236
264237 SUBCASE (" Dispatcher can be accessed directly" )
@@ -280,12 +253,6 @@ TEST_CASE("Basic message loop" * doctest::test_suite("messaging"))
280253 dispatcher.remove_message_handler (set_x), messaging::no_handler);
281254 REQUIRE_THROWS_AS (
282255 dispatcher.dispatch (set_x, nullptr , 0 ), messaging::no_handler);
283-
284- const auto counts = bp.get_dispatcher ().retrieve_message_counts ();
285- REQUIRE (counts.size () == 1 );
286- REQUIRE (counts.find (set_x) != counts.end ());
287- REQUIRE (counts.at (set_x).messages == 1 );
288- REQUIRE (counts.at (set_x).bytes == 0 );
289256 }
290257}
291258
0 commit comments