Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
EventLog_test Class Reference

Description

Test:
verify a logging facility, which can be used to ensure some events happened while running test code.
  • various kinds of events or function calls are logged via the logging API.
  • within the test code, a match is performed against the contents of the log, using a DSL to represent matches relative to other matches
  • when a match fails, additional diagnostics are printed to STDERR
See also
event-log.hpp

Definition at line 52 of file event-log-test.cpp.

Private Member Functions

void run (Arg)
 
void verify_simpleUsage ()
 
void verify_backwardMatch ()
 
void verify_negatedMatch ()
 
void verify_logJoining ()
 
void verify_callLogging ()
 
void verify_eventLogging ()
 
void verify_genericLogging ()
 
void verify_regExpMatch ()
 
void verify_logPurging ()
 

Member Function Documentation

◆ run()

void run ( Arg  )
inlineprivate

◆ verify_simpleUsage()

void verify_simpleUsage ( )
inlineprivate

Definition at line 70 of file event-log-test.cpp.

References EventMatch::before(), EventLog::event(), lib::idi::instanceTypeID(), and EventLog::verify().

Referenced by EventLog_test::run().

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

◆ verify_backwardMatch()

void verify_backwardMatch ( )
inlineprivate

Definition at line 93 of file event-log-test.cpp.

References EventMatch::after(), EventMatch::before(), EventLog::event(), EventMatch::locate(), and EventLog::verify().

Referenced by EventLog_test::run().

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

◆ verify_negatedMatch()

void verify_negatedMatch ( )
inlineprivate

Definition at line 115 of file event-log-test.cpp.

References EventMatch::after(), EventMatch::before(), EventLog::ensureNot(), and EventLog::event().

Referenced by EventLog_test::run().

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

◆ verify_logJoining()

void verify_logJoining ( )
inlineprivate
Test:
combining several logs The EventLog objects are actually just lightweight front-end handles, while the actual log lives on the Heap. This allows to have several handles hold onto the same actual log; this way, we can access and verify logs even after the managing object is destroyed.

The "log joining" functionality covered here is just an obvious extension to this setup: it allows to attach one log to another log after the fact; the contents of the joined log are integrated into the target log.

Remarks
this functionality is "low hanging fruit" – not sure if it's useful.

Definition at line 141 of file event-log-test.cpp.

References EventMatch::after(), EventMatch::before(), EventLog::ensureNot(), EventLog::event(), EventLog::joinInto(), and EventLog::verify().

Referenced by EventLog_test::run().

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

◆ verify_callLogging()

void verify_callLogging ( )
inlineprivate

Definition at line 204 of file event-log-test.cpp.

References EventMatch::after(), EventMatch::arg(), EventMatch::argPos(), EventMatch::before(), EventLog::call(), EventLog::ensureNot(), lib::idi::instanceTypeID(), EventMatch::on(), EventLog::verify(), and EventLog::verifyCall().

Referenced by EventLog_test::run().

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

◆ verify_eventLogging()

void verify_eventLogging ( )
inlineprivate

Definition at line 263 of file event-log-test.cpp.

References EventMatch::after(), EventMatch::arg(), EventMatch::before(), EventMatch::beforeCall(), EventLog::call(), EventLog::event(), EventMatch::id(), EventMatch::on(), EventLog::verify(), and EventLog::verifyEvent().

Referenced by EventLog_test::run().

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

◆ verify_genericLogging()

void verify_genericLogging ( )
inlineprivate

Definition at line 287 of file event-log-test.cpp.

References EventMatch::arg(), EventMatch::attrib(), EventMatch::before(), EventMatch::beforeEvent(), EventLog::create(), EventLog::destroy(), EventLog::error(), EventLog::fatal(), EventLog::note(), EventMatch::type(), EventLog::verify(), EventLog::verifyEvent(), and EventLog::warn().

Referenced by EventLog_test::run().

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

◆ verify_regExpMatch()

void verify_regExpMatch ( )
inlineprivate

Definition at line 336 of file event-log-test.cpp.

References EventMatch::after(), EventMatch::afterMatch(), EventMatch::argMatch(), EventMatch::before(), EventMatch::beforeMatch(), EventLog::ensureNot(), EventLog::fatal(), EventLog::note(), EventLog::verify(), EventLog::verifyEvent(), and EventLog::verifyMatch().

Referenced by EventLog_test::run().

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

◆ verify_logPurging()

void verify_logPurging ( )
inlineprivate

Definition at line 369 of file event-log-test.cpp.

References EventMatch::after(), EventLog::clear(), EventLog::create(), EventLog::ensureNot(), EventMatch::on(), EventMatch::type(), EventLog::verify(), and EventLog::warn().

Referenced by EventLog_test::run().

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

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