Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
event-log.hpp File Reference

Go to the source code of this file.

Description

Support for verifying the occurrence of events from unit tests.

Typically used within special rigging and instrumentation for tests, the [EventLog] allows to record invocations and similar events. It is implemented as a "PImpl" to allow sharing of logs, which helps to trace events from transient UI elements and from destructor code. The front-end used for access offers a query facility, so the test code may express some expected patterns of incidence and verify match or non-match.

Failure of match prints a detailed trace message to STDERR, in order to deliver a precise indication what part of the condition failed.

See also
TestEventLog_test
usage example

Definition in file event-log.hpp.

#include "lib/error.hpp"
#include "lib/idi/entry-id.hpp"
#include "lib/iter-adapter.hpp"
#include "lib/iter-cursor.hpp"
#include "lib/format-util.hpp"
#include "lib/format-cout.hpp"
#include "lib/diff/record.hpp"
#include "lib/symbol.hpp"
#include "lib/util.hpp"
#include <memory>
#include <vector>
#include <string>
#include <regex>

Classes

class  EventLog
 Helper to log and verify the occurrence of events. More...
 
class  EventMatch
 

Namespaces

 lib
 Implementation namespace for support and library code.
 
 lib::test