scope(failure) {writefln("Unittest failure :%s(%s)", __FILE__, __LINE__); stdout.flush();} scope(success) {writefln("Unittest success :%s(%s)", __FILE__, __LINE__); stdout.flush();} auto event = new SeqEventManager!(3, bool); size_t cnt; size_t[3] ns; event[0].strongConnect(delegate(b){ assert(b); ns[0] = cnt; ++cnt; }); event[1].strongConnect(delegate(b){ assert(b); ns[1] = cnt; ++cnt; }); event[2].strongConnect(delegate(b){ assert(b); ns[2] = cnt; ++cnt; }); event.emit(true); assert(cnt == 3); assert(ns[] == [0, 1, 2]);