Activity-Lang: notification settled and covered

This commit is contained in:
Fischlurch 2023-08-22 18:57:15 +02:00
parent 4fed0b8cd2
commit f1a446d85c
2 changed files with 81 additions and 12 deletions

View file

@ -72,7 +72,10 @@ namespace test {
verifyActivity_Invoke();
verifyActivity_Notify_activate();
verifyActivity_Notify_dispatch();
verifyActivity_Gate();
verifyActivity_Gate_pass();
verifyActivity_Gate_dead();
verifyActivity_Gate_block();
verifyActivity_Gate_opened();
termBuilder();
@ -112,7 +115,6 @@ namespace test {
* - invoke the λ-post to dispatch the chain through the queue
* - the chain to be executed is given as `next`
* - time window for scheduling as data field
* @todo WIP 8/23 ✔ define ✔ implement
*/
void
verifyActivity_Post()
@ -129,7 +131,6 @@ namespace test {
Time tt{11,11};
post.activate (tt, detector.executionCtx);
cout << detector.showLog() <<endl;
CHECK (detector.verifyInvocation("CTX-post").arg("11.011", "Act(POST", "≺test::CTX≻"));
}
@ -176,6 +177,7 @@ namespace test {
Time tt{111,11};
notify.activate (tt, detector.executionCtx);
cout << detector.showLog() <<endl;
CHECK (detector.verifyInvocation("CTX-post").arg("11.111", "Act(NOTIFY", "≺test::CTX≻"));
}
@ -189,22 +191,77 @@ namespace test {
verifyActivity_Notify_dispatch()
{
ActivityDetector detector;
Activity notify{detector.buildActivationProbe("targetActivity")};
// use a diagnostic Tap as chain to detect passing of notification
Activity notify{detector.buildActivationProbe("notifyTargetActivity")};
Time tt{111,11};
notify.dispatch (tt, detector.executionCtx);
cout << detector.showLog() <<endl;
CHECK (detector.verifyInvocation("notifyTargetActivity").arg("11.111"));
}
/** @test TODO behaviour of Activity::GATE
* @todo WIP 8/23 🔁 define ⟶ implement
*/
void
verifyActivity_Gate_pass()
{
Activity chain;
Activity gate{0};
gate.next = &chain;
ActivityDetector detector;
cout << detector.showLog() <<endl;
}
/** @test TODO behaviour of Activity::GATE
* @todo WIP 7/23 ⟶ define ⟶ implement
* @todo WIP 8/23 🔁 define ⟶ implement
*/
void
verifyActivity_Gate()
verifyActivity_Gate_dead()
{
Activity chain;
Activity gate{0};
gate.next = &chain;
ActivityDetector detector;
cout << detector.showLog() <<endl;
}
/** @test TODO behaviour of Activity::GATE
* @todo WIP 8/23 🔁 define ⟶ implement
*/
void
verifyActivity_Gate_block()
{
Activity chain;
Activity gate{0};
gate.next = &chain;
ActivityDetector detector;
cout << detector.showLog() <<endl;
}
/** @test TODO behaviour of Activity::GATE
* @todo WIP 8/23 🔁 define ⟶ implement
*/
void
verifyActivity_Gate_opened()
{
Activity chain;
Activity gate{0};
gate.next = &chain;
ActivityDetector detector;
cout << detector.showLog() <<endl;
}

View file

@ -79551,16 +79551,28 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
<node COLOR="#338800" CREATED="1689199390484" ID="ID_176395611" MODIFIED="1692369867056" TEXT="verifyActivity_Invoke">
<icon BUILTIN="button_ok"/>
</node>
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689199390484" ID="ID_1274424925" MODIFIED="1692718461523" TEXT="verifyActivity_Notify_activate">
<icon BUILTIN="pencil"/>
<node COLOR="#338800" CREATED="1689199390484" ID="ID_1274424925" MODIFIED="1692723164509" TEXT="verifyActivity_Notify_activate">
<icon BUILTIN="button_ok"/>
</node>
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1692718437941" ID="ID_1363192893" MODIFIED="1692718461522" TEXT="verifyActivity_Notify_dispatch">
<icon BUILTIN="pencil"/>
<node COLOR="#338800" CREATED="1692718437941" ID="ID_1363192893" MODIFIED="1692723165688" TEXT="verifyActivity_Notify_dispatch">
<icon BUILTIN="button_ok"/>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689199390484" ID="ID_212018049" MODIFIED="1692544359039" TEXT="verifyActivity_Gate">
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689199390484" ID="ID_212018049" MODIFIED="1692723170521" TEXT="verifyActivity_Gate">
<linktarget COLOR="#2c8d69" DESTINATION="ID_212018049" ENDARROW="Default" ENDINCLINATION="556;74;" ID="Arrow_ID_1693904148" SOURCE="ID_1220469732" STARTARROW="None" STARTINCLINATION="472;34;"/>
<icon BUILTIN="pencil"/>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1692723178576" ID="ID_214653366" MODIFIED="1692723193879" TEXT="pass">
<icon BUILTIN="flag-yellow"/>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1692723181232" ID="ID_1906220001" MODIFIED="1692723193880" TEXT="dead">
<icon BUILTIN="flag-yellow"/>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1692723183479" ID="ID_785522791" MODIFIED="1692723193880" TEXT="block">
<icon BUILTIN="flag-yellow"/>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1692723186655" ID="ID_343855322" MODIFIED="1692723193881" TEXT="opened">
<icon BUILTIN="flag-yellow"/>
</node>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689200547247" ID="ID_1506436785" MODIFIED="1689200552551" TEXT="termBuilder">
<icon BUILTIN="flag-yellow"/>
</node>