// Step 1935: DAPEventBroadcaster // // t1: subscribe and broadcast fires handler // t2: multiple subscribers for same event type all fire // t3: unsubscribe stops handler from firing // t4: broadcastAll routes by event["event"] // t5: subscriberCount correct; different types independent #include "DAPEventBroadcaster.h" #include namespace ws = whetstone; static int p=0,f=0; #define T(n) { std::cout<<" "<<#n<<"... "; } #define P() { std::cout<<"PASS\n"; ++p; } #define F(m) { std::cout<<"FAIL: "< 0 ? 1 : 0; }