diff --git a/tests/vault/gear/scheduler-activity-test.cpp b/tests/vault/gear/scheduler-activity-test.cpp
index 29c29d9d8..6f797282b 100644
--- a/tests/vault/gear/scheduler-activity-test.cpp
+++ b/tests/vault/gear/scheduler-activity-test.cpp
@@ -68,9 +68,10 @@ namespace test {
{
simpleUsage();
- verifyActivity_Invoke();
- verifyActivity_Notify();
verifyActivity_Post();
+ verifyActivity_Invoke();
+ verifyActivity_Notify_activate();
+ verifyActivity_Notify_dispatch();
verifyActivity_Gate();
termBuilder();
@@ -81,18 +82,52 @@ namespace test {
}
- /** @test TODO demonstrate a simple usage scenario
- * @todo WIP 7/23 🔁 define 🔁 implement
- */
+ /** @test demonstrate simple Activity usage */
void
simpleUsage()
{
// Activities are »POD with constructor«
- Activity gate{5, Time{FSecs{3,2}}};
- CHECK (gate.verb_ == Activity::GATE);
- CHECK (gate.next == nullptr);
- CHECK (gate.data_.condition.rest == 5);
- CHECK (gate.data_.condition.dead == Time(500,1));
+ Activity start{Activity::WORKSTART};
+ CHECK (start.verb_ == Activity::WORKSTART);
+ CHECK (start.next == nullptr);
+ CHECK (start.data_.timing.instant == Time::NEVER); //////////////////////////////////////////TICKET #1317 : the purpose of this time data is not clear yet
+ CHECK (start.data_.timing.quality == 0);
+
+ // use the ActivityDetector for test instrumentation...
+ ActivityDetector detector;
+
+ // Activities can be invoked within an ExecutionContext
+ Time now = RealClock::now();
+ start.activate (now, detector.executionCtx);
+
+ // In this case, activation causes invocation of λ-work on the context
+ CHECK (detector.verifyInvocation("CTX-work").arg(now, 0));
+
+// cout << detector.showLog()<
-
+
-
-
+
+
-
-
+
+
@@ -79495,8 +79495,8 @@ Date: Thu Apr 20 18:53:17 2023 +0200
-
-
+
+
@@ -79533,20 +79533,29 @@ Date: Thu Apr 20 18:53:17 2023 +0200
-
-
-
-
+
+
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+