Subject | Hash | Author | Date (UTC) |
---|---|---|---|
once_wile_emit | 785a96521c22785401b9408a54a4ffb5c1541fa1 | mucbuc | 2019-11-12 04:37:40 |
on_while_emit | 40ce61bbb69d5557944c3055d7fca492acf86e70 | mucbuc | 2019-11-11 15:21:30 |
modify while traverse | ed70186f19dea7c92a9b98c0df7aec4973a37b98 | mucbuc | 2019-11-11 15:10:58 |
on test | b8fc778d7056fb108fbdd7318f294e2b340faeeb | mucbuc | 2019-11-11 15:01:22 |
emit with args | a40831a0902f0dfa35d8f5e314b1e5b21955eae7 | mucbuc | 2019-11-11 14:40:46 |
emit with arg | 2cfab1f1668896ac6d58e868b8ee6d41a79dc447 | mucbuc | 2019-11-11 02:45:45 |
check dispatch logic | 5b40033514e610292c25336b821829675c8f7edd | mucbuc | 2019-11-11 02:35:18 |
another test | 718946ff7621bab0d8242e19ab423626c41a0b97 | mucbuc | 2019-11-11 02:20:42 |
emit once | d3d244834caec7f581b254957c22b8f1c2af5321 | mucbuc | 2019-11-11 00:31:05 |
brreaking apart tests | 0fa426d441993960bb8752d646744c748f2767f4 | mucbuc | 2019-11-11 00:13:05 |
trimmed | 765e78aeba5eab8cd4ab933792327b393322c56a | mucbuc | 2019-11-10 22:39:52 |
fix convcurent test | 11773096bd273e10835aa534f8f45ed2f25b2af6 | mucbuc | 2019-11-09 20:10:17 |
break appat | e70933ddd90fcc006e0456cb60b096144e17b8bf | mucbuc | 2019-11-09 19:52:07 |
use paramete pack | 04b380271051ac0f8a18135fde01a80b8e6b67ef | mucbuc | 2019-11-05 04:48:58 |
cleanup | 69d0ce30002b97c5a2da1309677e0078b24f5615 | mucbuc | 2019-11-03 00:31:22 |
fix compile time error | fbc1c35e2389d9fffebe94808385ded809b4061a | mucbuc | 2019-11-03 00:30:41 |
rm dynamo | 10a004cc3ffda178fe3c592d1e32e5a39078adff | mucbuc | 2019-11-03 00:07:17 |
point to aws code commit | fdfa4593d13b1fadcbed55b91b37239dfabc0941 | mucbuc | 2019-11-02 23:57:24 |
cleanup template stuff | 4ebc0945d2e8cf2c7a1f75d3dab125b83f76078d | mucbuc | 2019-11-02 21:09:51 |
more cleanup | bfbe00170ae67ea7e8e1cb23e4e352b18188b5a9 | mucbuc | 2019-11-02 21:01:10 |
File | Lines added | Lines deleted |
---|---|---|
test/on_while_emit.json | 1 | 1 |
test/once_while_emit.json | 1 | 1 |
test/src/on_while_emit.cpp | 8 | 9 |
test/src/once_while_emit.cpp | 5 | 3 |
test/tests.json | 2 | 1 |
File test/on_while_emit.json copied from file test/emit_once.json (similarity 75%) (mode: 100644) (index e7915a7..4a6cf2f) | |||
3 | 3 | "lib/ohm/ohm.json" | "lib/ohm/ohm.json" |
4 | 4 | ], | ], |
5 | 5 | "sources": [ | "sources": [ |
6 | "src/emit_once.cpp", | ||
6 | "src/on_while_emit.cpp", | ||
7 | 7 | "src/emitter_fwd.h" | "src/emitter_fwd.h" |
8 | 8 | ] | ] |
9 | 9 | } | } |
File test/once_while_emit.json copied from file test/emit_once.json (similarity 73%) (mode: 100644) (index e7915a7..ea7764d) | |||
3 | 3 | "lib/ohm/ohm.json" | "lib/ohm/ohm.json" |
4 | 4 | ], | ], |
5 | 5 | "sources": [ | "sources": [ |
6 | "src/emit_once.cpp", | ||
6 | "src/once_while_emit.cpp", | ||
7 | 7 | "src/emitter_fwd.h" | "src/emitter_fwd.h" |
8 | 8 | ] | ] |
9 | 9 | } | } |
File test/src/on_while_emit.cpp copied from file test/src/once_while_emit.h (similarity 73%) (mode: 100644) (index 5a3af53..59527b1) | |||
1 | #include <tmp/src/test.h> | ||
2 | 1 | ||
3 | 2 | #include <iostream> | #include <iostream> |
4 | 3 | #include <vector> | #include <vector> |
5 | 4 | ||
5 | #include <tmp/src/test.h> | ||
6 | #include <lib/ohm/src/quemitter.h> | ||
7 | |||
6 | 8 | using namespace std; | using namespace std; |
7 | 9 | using namespace om636; | using namespace om636; |
8 | 10 | template <template <class, class> class T> | template <template <class, class> class T> |
9 | void check_once_while_emit() | ||
11 | void check_on_while_emit() | ||
10 | 12 | { | { |
11 | 13 | typedef T<string, function<void()> > emitter_type; | typedef T<string, function<void()> > emitter_type; |
12 | 14 | typedef typename emitter_type::listener_type listener_type; | typedef typename emitter_type::listener_type listener_type; |
... | ... | void check_once_while_emit() | |
17 | 19 | unsigned counter(0); | unsigned counter(0); |
18 | 20 | ||
19 | 21 | listeners.push_back(emitter.once("load", [&]() { | listeners.push_back(emitter.once("load", [&]() { |
20 | listeners.push_back(emitter.once("on", [&]() { | ||
22 | listeners.push_back(emitter.on("on", [&]() { | ||
21 | 23 | ++counter; | ++counter; |
22 | 24 | })); | })); |
23 | 25 | ||
... | ... | void check_once_while_emit() | |
27 | 29 | emitter.emit("load"); | emitter.emit("load"); |
28 | 30 | emitter.emit("on"); | emitter.emit("on"); |
29 | 31 | ||
30 | ASSERT(counter == 1); | ||
32 | ASSERT(counter == 2); | ||
31 | 33 | ||
32 | 34 | FOOTER; | FOOTER; |
33 | 35 | } | } |
34 | 36 | ||
35 | #include <tmp/src/test.h> | ||
36 | #include <lib/ohm/src/emitter.h> | ||
37 | |||
38 | 37 | template <class T, class U> | template <class T, class U> |
39 | 38 | using QueuedEmitter = om636::control::Quemitter<T, U>; | using QueuedEmitter = om636::control::Quemitter<T, U>; |
40 | 39 | ||
... | ... | int main() | |
42 | 41 | { | { |
43 | 42 | using namespace std; | using namespace std; |
44 | 43 | ||
45 | test_emitter<om636::control::Emitter>(); | ||
46 | test_emitter<QueuedEmitter>(); | ||
44 | check_on_while_emit<om636::control::Emitter>(); | ||
45 | check_on_while_emit<QueuedEmitter>(); | ||
47 | 46 | ||
48 | 47 | return 0; | return 0; |
49 | 48 | } | } |
File test/src/once_while_emit.cpp renamed from test/src/once_while_emit.h (similarity 86%) (mode: 100644) (index 5a3af53..f020cca) | |||
1 | #include <tmp/src/test.h> | ||
2 | 1 | ||
3 | 2 | #include <iostream> | #include <iostream> |
4 | 3 | #include <vector> | #include <vector> |
5 | 4 | ||
5 | #include <tmp/src/test.h> | ||
6 | #include <lib/ohm/src/quemitter.h> | ||
7 | |||
6 | 8 | using namespace std; | using namespace std; |
7 | 9 | using namespace om636; | using namespace om636; |
8 | 10 | template <template <class, class> class T> | template <template <class, class> class T> |
... | ... | int main() | |
42 | 44 | { | { |
43 | 45 | using namespace std; | using namespace std; |
44 | 46 | ||
45 | test_emitter<om636::control::Emitter>(); | ||
46 | test_emitter<QueuedEmitter>(); | ||
47 | check_once_while_emit<om636::control::Emitter>(); | ||
48 | check_once_while_emit<QueuedEmitter>(); | ||
47 | 49 | ||
48 | 50 | return 0; | return 0; |
49 | 51 | } | } |
File test/tests.json changed (mode: 100644) (index a1d204e..8d7b9da) | |||
9 | 9 | "emit_with_args.json", | "emit_with_args.json", |
10 | 10 | "on.json", | "on.json", |
11 | 11 | "modify_while_traversal.json", | "modify_while_traversal.json", |
12 | "on_while_emit.json" | ||
12 | "on_while_emit.json", | ||
13 | "once_while_emit.json" | ||
13 | 14 | ] } | ] } |