Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
ActivityMatch Class Reference

#include "/Werk/devel/lumi/tests/vault/gear/activity-detector.hpp"

Description

ongoing evaluation and match of observed activities.

Remarks
this temporary object provides a builder API for creating chained verifications, similar to the usage of lib::test::EventLog. Moreover, it is convertible to bool to retrieve the verification result.

Definition at line 129 of file activity-detector.hpp.

Public Member Functions

 operator bool () const
 final evaluation of the verification query, usually triggered from the unit test CHECK().
 
ActivityMatchbeforeInvocation (string match)
 
ActivityMatchafterInvocation (string match)
 
template<typename... ARGS>
ActivityMatcharg (ARGS const &...args)
 qualifier: additionally match the function arguments
 
ActivityMatchseq (uint seqNr)
 qualifier: additionally require the indicated sequence number
 
ActivityMatchbeforeSeqIncrement (uint seqNr)
 special query to match an increment of the sequence number
 
ActivityMatchafterSeqIncrement (uint seqNr)
 
ActivityMatchtimeArg (Time const &time)
 qualifier: additionally match the nominal time argument of JobFunctor invocation
 

Friends

class ActivityDetector
 

Private Types

using _Parent = lib::test::EventMatch
 

Private Member Functions

 ActivityMatch (lib::test::EventMatch &&matcher)
 
template<typename... ARGS>
ActivityMatchdelegate (_Parent &(_Parent::*fun)(ARGS...), ARGS &&...args)
 
- Private Member Functions inherited from EventMatch
 operator bool () const
 final evaluation of the match query, usually triggered from the unit test CHECK().
 
EventMatchlocate (string match)
 basic search function: continue linear lookup over the elements of the EventLog to find a match (substring match) of the given text.
 
EventMatchlocateMatch (string regExp)
 basic search like locate() but with the given regular expression
 
EventMatchlocateEvent (string match)
 basic search for a matching "event"
 
EventMatchlocateEvent (string classifier, string match)
 
EventMatchlocateCall (string match)
 basic search for some specific function invocation
 
EventMatchbefore (string match)
 find a match (substring match) of the given text in an EventLog entry after the current position
 
EventMatchbeforeMatch (string regExp)
 find a match with the given regular expression
 
EventMatchbeforeEvent (string match)
 find a match for an "event" after the current point of reference
 
EventMatchbeforeEvent (string classifier, string match)
 
EventMatchbeforeCall (string match)
 find a match for some function invocation after the current point of reference
 
EventMatchafter (string match)
 find a match (substring match) of the given text in an EventLog entry before the current position, switching to backwards search direction
 
EventMatchafterMatch (string regExp)
 
EventMatchafterEvent (string match)
 
EventMatchafterEvent (string classifier, string match)
 
EventMatchafterCall (string match)
 find a function invocation backwards, before the current point of reference
 
template<typename... ARGS>
EventMatcharg (ARGS const &...args)
 refine filter to additionally require specific arguments
 
template<typename... ARGS>
EventMatchargMatch (ARGS const &...regExps)
 refine filter to additionally cover all arguments with a series of regular expressions.
 
template<typename ARG >
EventMatchargPos (size_t idx, ARG const &arg)
 refine filter to additionally require match on a specific positional argument
 
EventMatchtype (string typeID)
 refine filter to additionally require a matching log entry type
 
EventMatchkey (string key)
 refine filter to additionally require the presence an attribute
 
EventMatchattrib (string key, string valueMatch)
 refine filter to additionally match on a specific attribute
 
EventMatchid (string classifier)
 refine filter to additionally match on the ID attribute
 
EventMatchon (string targetID)
 refine filter to additionally match the ‘'this’` attribute
 
EventMatchon (CStr targetID)
 
template<typename X >
EventMatchon (const X *const targetObj)
 

Constructor & Destructor Documentation

◆ ActivityMatch()

ActivityMatch ( lib::test::EventMatch &&  matcher)
inlineprivate

Definition at line 134 of file activity-detector.hpp.

Member Typedef Documentation

◆ _Parent

using _Parent = lib::test::EventMatch
private

Definition at line 132 of file activity-detector.hpp.

Member Function Documentation

◆ operator bool()

operator bool ( ) const
inline

final evaluation of the verification query, usually triggered from the unit test CHECK().

Note
failure cause is printed to STDERR.

Definition at line 147 of file activity-detector.hpp.

◆ beforeInvocation()

◆ afterInvocation()

ActivityMatch & afterInvocation ( string  match)
inline

Definition at line 155 of file activity-detector.hpp.

References ActivityMatch::delegate().

Referenced by SchedulerActivity_test::dispatchChain(), SchedulerActivity_test::scenario_IOJob(), SchedulerActivity_test::scenario_Notification(), and SchedulerActivity_test::verifyActivity_Gate_opened().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ arg()

template<typename... ARGS>
ActivityMatch & arg ( ARGS const &...  args)
inline

qualifier: additionally match the function arguments

Definition at line 162 of file activity-detector.hpp.

References ActivityMatch::delegate().

Referenced by SchedulerCommutator_test::demonstrateSimpleUsage(), SchedulerActivity_test::dispatchChain(), ActivityDetector_test::insert_ActivationTap(), SchedulerCommutator_test::integratedWorkCycle(), SchedulerActivity_test::scenario_IOJob(), SchedulerActivity_test::scenario_MetaJob(), SchedulerActivity_test::scenario_Notification(), SchedulerActivity_test::scenario_RenderJob(), SchedulerService_test::scheduleRenderJob(), SchedulerActivity_test::simpleUsage(), SchedulerActivity_test::verifyActivity_Gate_block(), SchedulerActivity_test::verifyActivity_Gate_dead(), SchedulerActivity_test::verifyActivity_Gate_notify(), SchedulerActivity_test::verifyActivity_Gate_opened(), SchedulerActivity_test::verifyActivity_Gate_pass(), SchedulerActivity_test::verifyActivity_Invoke(), SchedulerActivity_test::verifyActivity_Notify(), SchedulerActivity_test::verifyActivity_Post(), ActivityDetector_test::verifyFakeExeContext(), ActivityDetector_test::verifyMockInvocation(), ActivityDetector_test::verifyMockJobFunctor(), ActivityDetector_test::watch_ActivationTap(), and ActivityDetector_test::watch_notification().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ seq()

ActivityMatch & seq ( uint  seqNr)
inline

qualifier: additionally require the indicated sequence number

Definition at line 169 of file activity-detector.hpp.

References EventMatch::attrib(), and util::toString().

Referenced by SchedulerActivity_test::dispatchChain(), SchedulerActivity_test::scenario_IOJob(), SchedulerActivity_test::scenario_Notification(), SchedulerActivity_test::verifyActivity_Gate_dead(), SchedulerActivity_test::verifyActivity_Gate_opened(), ActivityDetector_test::verifyFakeExeContext(), ActivityDetector_test::verifyFakeInvocation(), ActivityDetector_test::verifyMockInvocation(), ActivityDetector_test::verifyMockJobFunctor(), ActivityDetector_test::watch_ActivationTap(), ActivityDetector_test::watch_gate(), and ActivityDetector_test::watch_notification().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ beforeSeqIncrement()

ActivityMatch & beforeSeqIncrement ( uint  seqNr)
inline

special query to match an increment of the sequence number

Definition at line 177 of file activity-detector.hpp.

References EventMatch::beforeEvent(), and util::toString().

Referenced by ActivityDetector_test::verifyMockInvocation(), and ActivityDetector_test::watch_gate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterSeqIncrement()

ActivityMatch & afterSeqIncrement ( uint  seqNr)
inline

Definition at line 183 of file activity-detector.hpp.

References EventMatch::afterEvent(), and util::toString().

+ Here is the call graph for this function:

◆ timeArg()

ActivityMatch & timeArg ( Time const &  time)
inline

qualifier: additionally match the nominal time argument of JobFunctor invocation

Definition at line 191 of file activity-detector.hpp.

References ActivityMatch::delegate().

Referenced by ActivityDetector_test::insert_ActivationTap(), ActivityDetector_test::verifyFakeExeContext(), ActivityDetector_test::verifyMockJobFunctor(), ActivityDetector_test::watch_ActivationProbe(), and ActivityDetector_test::watch_gate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delegate()

template<typename... ARGS>
ActivityMatch & delegate ( _Parent &(_Parent::*)(ARGS...)  fun,
ARGS &&...  args 
)
inlineprivate

helper to delegate to the inherited matcher building blocks

Note
since ActivityMatch can only be created by ActivityDetector, we can be sure the EventMatch reference returned from these calls is actually a reference to *this, and can thus be downcasted.

Definition at line 205 of file activity-detector.hpp.

Referenced by ActivityMatch::afterInvocation(), ActivityMatch::arg(), ActivityMatch::beforeInvocation(), and ActivityMatch::timeArg().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ ActivityDetector

friend class ActivityDetector
friend

Definition at line 138 of file activity-detector.hpp.

+ Inheritance diagram for ActivityMatch:
+ Collaboration diagram for ActivityMatch:

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