Lumiera  0.pre.03
»edit your freedom«
ActivityDetector_test Class Reference

Description

Test:
verify instrumentation setup to watch scheduler Activities.
See also
SchedulerActivity_test
SchedulerUsage_test

Definition at line 55 of file activity-detector-test.cpp.

Private Member Functions

void insert_ActivationTap ()
 
virtual void run (Arg)
 
void simpleUsage ()
 
void verifyFakeExeContext ()
 
void verifyFakeInvocation ()
 
void verifyMockInvocation ()
 
void verifyMockJobFunctor ()
 
void watch_ActivationProbe ()
 
void watch_ActivationTap ()
 
void watch_gate ()
 
void watch_notification ()
 

Member Function Documentation

◆ simpleUsage()

void simpleUsage ( )
inlineprivate
Test:
demonstrate a simple usage scenario of this test support facility

Definition at line 78 of file activity-detector-test.cpp.

References ActivityDetector::buildDiagnosticFun().

+ Here is the call graph for this function:

◆ verifyMockInvocation()

void verifyMockInvocation ( )
inlineprivate
Test:
verify the setup and detection of instrumented invocations
  • a sequence number is embedded into the ActivityDetector
  • this sequence number is recorded into an attribute at each invocation
  • a DSL for verification is provided (based on the EventLog)
  • arguments and sequence numbers can be explicitly checked

Definition at line 100 of file activity-detector-test.cpp.

◆ verifyFakeInvocation()

void verifyFakeInvocation ( )
inlineprivate
Test:
verify a variation of the instrumented functor to call into a custom provided fake implementation.

Definition at line 146 of file activity-detector-test.cpp.

◆ verifyMockJobFunctor()

void verifyMockJobFunctor ( )
inlineprivate
Test:
diagnostic setup to detect a JobFunctor activation
  • the ActivityDetector provides specifically rigged JobFunctor instances
  • these capture all invocations, based on generic invocation logging
  • special match qualifier to verify the job's nominal invocation time parameter
  • event verification can be combined with other verifications to cover complex invocation sequences

Definition at line 177 of file activity-detector-test.cpp.

References ActivityMatch::arg(), ActivityDetector::incrementSeq(), TimeValue::SCALE, ActivityMatch::seq(), and ActivityMatch::timeArg().

+ Here is the call graph for this function:

◆ verifyFakeExeContext()

void verifyFakeExeContext ( )
inlineprivate
Test:
faked execution context to perform Activity activation
  • wired internally to report each invocation into the EventLog
  • by default response of post and tick is PASS, but can be reconfigured
  • invocation sequence can be verified by matching internally logged events

Definition at line 213 of file activity-detector-test.cpp.

◆ watch_ActivationProbe()

void watch_ActivationProbe ( )
inlineprivate
Test:
a rigged diagnostic probe to detect Activity activation

Definition at line 259 of file activity-detector-test.cpp.

References Activity::activate(), ActivityDetector::buildActivationProbe(), Activity::HOOK, and ActivityMatch::timeArg().

+ Here is the call graph for this function:

◆ watch_ActivationTap()

void watch_ActivationTap ( )
inlineprivate
Test:
diagnostic adaptor to detect and pass-through Activity activation

Definition at line 283 of file activity-detector-test.cpp.

References Activity::next.

◆ insert_ActivationTap()

void insert_ActivationTap ( )
inlineprivate
Test:
inject (prepend) an ActivationTap into existing wiring

Definition at line 324 of file activity-detector-test.cpp.

References Activity::activate(), ActivityMatch::arg(), Activity::HOOK, ActivityDetector::insertActivationTap(), Activity::next, Activity::TICK, and ActivityMatch::timeArg().

+ Here is the call graph for this function:

◆ watch_notification()

void watch_notification ( )
inlineprivate
Test:
diagnostic setup to detect and watch passing a notification
  • setup a chain-Activity (here: a TICK) protected by a GATE
  • configure the GATE to require one notification
  • connect a NOTIFY-Activity to trigger the GATE
  • inject a diagnostics Tap into the notification-connection
  • dispatch of the notification can be verified
  • notification has been passed through the Tap to the GATE
  • GATE has been decremented to zero and triggers chain
  • finally the chained TICK-Activity calls into the executionCtx

Definition at line 361 of file activity-detector-test.cpp.

References Activity::activate(), ActivityMatch::arg(), ActivityDetector::incrementSeq(), ActivityDetector::insertActivationTap(), Activity::next, and ActivityMatch::seq().

+ Here is the call graph for this function:

◆ watch_gate()

void watch_gate ( )
inlineprivate
Test:
diagnostic setup to watch Activity::GATE activation
  • when applied, Tap will be inserted before and after the instrumented GATE-Activity
  • it can thus be traced when the Gate is activated, but also when the Gate condition is met and the next Activity after the Gate is activated
  • for this unit-test, a Gate and a follow-up Activity is invoked directly, to verify the generated log entries

Definition at line 400 of file activity-detector-test.cpp.

References Activity::activate(), ActivityMatch::beforeSeqIncrement(), ActivityDetector::incrementSeq(), Activity::next, ActivityMatch::seq(), and ActivityMatch::timeArg().

+ Here is the call graph for this function:
+ Inheritance diagram for ActivityDetector_test:
+ Collaboration diagram for ActivityDetector_test:

The documentation for this class was generated from the following file: