List of commits:
Subject Hash Author Date (UTC)
once tests 9aae5bf8c8a46439e7b350c4166c1be22c6028bf mucbuc 2020-01-20 20:08:50
once a72a9ea4d78e082b0e4e6a8545af92e116bd7536 mucbuc 2020-01-20 17:32:34
dynamo 25b14b6965bb24b21516dde3f4a2a1922d518ae5 mucbuc 2020-01-20 17:27:35
concurrent test passes 2bd62976d536c8c81659453e899a2e9c588f4aa6 mucbuc 2020-01-20 12:54:46
update dynamo 3315ba6e643d56478aaf05761368d76e9025de79 mucbuc 2020-01-20 12:13:05
circular update 7545023e77dcb92f28612a62b6405cb488adddc8 mucbuc 2020-01-19 12:09:22
cleanup remove stuff abe9e96601cdfc558823e6d856d16dac8ad15929 mucbuc 2020-01-19 11:52:54
circut update 4d75370846cd93032a684b5193494273a9ba9da9 mucbuc 2020-01-19 11:50:21
dynamoe update 814d85ebb0c03dddfd2d804d404286cc01209687 mucbuc 2020-01-19 06:59:11
simplify interfiace f69d4f7a7c2c02125ac51ffb9d4ba41ed08f8646 mucbuc 2020-01-19 06:41:36
fix another test fd8e7fa14a4daa281e7fbcec875bfe56ce39e400 mucbuc 2020-01-18 22:42:40
working on tests 1b57cbb4e806eda21565dc8bd7e7fe7ff1cb5fff mucbuc 2020-01-18 22:36:15
fix test 8b364e739d1e12cd77b9f63efb0a245a75e695df mucbuc 2020-01-18 21:49:21
fix emit once 71aba1ef472aa23c9c9a8529b5258599a6289c16 mucbuc 2020-01-18 21:41:03
remove agentlifetime test ce0fba661c6110fc050203a1a8f9fedf39258615 mucbuc 2020-01-18 11:25:44
emit with arg passes 1b2288e8472b749c513120c441397a77298ab0b7 mucbuc 2020-01-17 10:58:28
dynamo update 7082792be9aa3ccb56b0afbddf58bdf468d56030 mucbuc 2020-01-17 05:32:03
circuit 9877e777b93a54d396248ad449f6ba5abf324733 mucbuc 2020-01-17 04:22:05
dynamo v2dev 15f474b5a627558c230b2fe96c40fb5c68a176d0 mucbuc 2020-01-17 04:21:40
research 47ce3a71d001f2aea7af852673b42b83f20be4dd Ubuntu 2019-12-22 17:19:57
Commit 9aae5bf8c8a46439e7b350c4166c1be22c6028bf - once tests
Author: mucbuc
Author date (UTC): 2020-01-20 20:08
Committer name: mucbuc
Committer date (UTC): 2020-01-20 20:08
Parent(s): a72a9ea4d78e082b0e4e6a8545af92e116bd7536
Signing key:
Tree: c8998579a2c1191c79d7d10cc7ca4bb31e3c2493
File Lines added Lines deleted
test/emit_once.json 2 1
test/once_while_emit.json 2 1
test/once_while_emit_recursive.json 9 0
test/src/emit_once.cpp 33 0
test/src/once_while_emit.cpp 3 3
test/src/once_while_emit_recursive.cpp 4 8
test/tests.json 5 1
File test/emit_once.json copied from file test/emit_while_emit.json (similarity 56%) (mode: 100644) (index 55f7a69..e7915a7)
3 3 "lib/ohm/ohm.json" "lib/ohm/ohm.json"
4 4 ], ],
5 5 "sources": [ "sources": [
6 "src/emit_while_emit.cpp"
6 "src/emit_once.cpp",
7 "src/emitter_fwd.h"
7 8 ] ]
8 9 } }
File test/once_while_emit.json copied from file test/emit_while_emit.json (similarity 53%) (mode: 100644) (index 55f7a69..ea7764d)
3 3 "lib/ohm/ohm.json" "lib/ohm/ohm.json"
4 4 ], ],
5 5 "sources": [ "sources": [
6 "src/emit_while_emit.cpp"
6 "src/once_while_emit.cpp",
7 "src/emitter_fwd.h"
7 8 ] ]
8 9 } }
File test/once_while_emit_recursive.json added (mode: 100644) (index 0000000..8ea14d7)
1 {
2 "include":[
3 "lib/ohm/ohm.json"
4 ],
5 "sources": [
6 "src/once_while_emit_recursive.cpp",
7 "src/emitter_fwd.h"
8 ]
9 }
File test/src/emit_once.cpp added (mode: 100644) (index 0000000..9df782b)
1 #include <tmp/src/test.h>
2
3 #include <iostream>
4 #include <lib/ohm/src/emitter_impl.h>
5
6 using namespace std;
7 using namespace om636;
8 using namespace control;
9
10 int main()
11 {
12 typedef EmitterImpl<string, int> emitter_type;
13 emitter_type e;
14
15 unsigned counter(0);
16
17 auto l(e.once("hello", [&](int) {
18 ++counter;
19 }));
20
21 auto k(e.once("allo", [&](int) {
22 ++counter;
23 }));
24
25 e.interupt("hello", 0);
26 e.interupt("hello", 0);
27 e.interupt("allo", 9);
28 e.interupt("allo", 9);
29
30 ASSERT(counter == 2 && "emit once");
31
32 return 0;
33 }
File test/src/once_while_emit.cpp copied from file test/src/on_while_emit.cpp (similarity 78%) (mode: 100644) (index e916b6a..38809c1)
... ... int main()
19 19
20 20 unsigned counter(0); unsigned counter(0);
21 21
22 listeners.push_back(emitter.on("load", [&]() {
23 listeners.push_back(emitter.on("on", [&]() {
22 listeners.push_back(emitter.once("load", [&]() {
23 listeners.push_back(emitter.once("on", [&]() {
24 24 ++counter; ++counter;
25 25 })); }));
26 26
 
... ... int main()
30 30 emitter.interupt("load"); emitter.interupt("load");
31 31 emitter.interupt("on"); emitter.interupt("on");
32 32
33 ASSERT(counter == 2 && "check_on_while_emit" );
33 ASSERT(counter == 1);
34 34
35 35 return 0; return 0;
36 36 } }
File test/src/once_while_emit_recursive.cpp copied from file test/src/on_while_emit.cpp (similarity 68%) (mode: 100644) (index e916b6a..5ae623f)
... ... int main()
11 11 using namespace std; using namespace std;
12 12 using namespace om636; using namespace om636;
13 13 using namespace control; using namespace control;
14
14 15 typedef EmitterImpl<string> emitter_type; typedef EmitterImpl<string> emitter_type;
15 16 typedef typename emitter_type::listener_type listener_type; typedef typename emitter_type::listener_type listener_type;
16 17
 
... ... int main()
19 20
20 21 unsigned counter(0); unsigned counter(0);
21 22
22 listeners.push_back(emitter.on("load", [&]() {
23 listeners.push_back(emitter.on("on", [&]() {
24 ++counter;
25 }));
26
23 listeners.push_back(emitter.once("on", [&]() {
24 ++counter;
27 25 emitter.interupt("on"); emitter.interupt("on");
28 26 })); }));
29 27
30 emitter.interupt("load");
31 28 emitter.interupt("on"); emitter.interupt("on");
32 29
33 ASSERT(counter == 2 && "check_on_while_emit" );
34
30 ASSERT(counter == 1 && "check_once_while_emit_recursive");
35 31 return 0; return 0;
36 32 } }
File test/tests.json changed (mode: 100644) (index 70c5684..984c27a)
1 1 { {
2 2 "tests":[ "tests":[
3 3 "concurrent.json", "concurrent.json",
4 "emit_once.json",
4 5 "dispatch_logic.json", "dispatch_logic.json",
6 "emit_while_emit.json",
5 7 "emit_with_arg.json", "emit_with_arg.json",
6 8 "emit_with_args.json", "emit_with_args.json",
7 9 "on.json", "on.json",
8 10 "modify_while_traversal.json", "modify_while_traversal.json",
9 "on_while_emit.json"
11 "on_while_emit.json",
12 "once_while_emit.json",
13 "once_while_emit_recursive.json"
10 14 ] } ] }
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mucbuc/ohm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mucbuc/ohm

Clone this repository using git:
git clone git://git.rocketgit.com/user/mucbuc/ohm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main