VICI  0.11.815
Visual Chart Interpreter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VICI::cdi::AsyncTestCase Class Referenceabstract

Responsible for handling asynchronous tests. More...

#include <vici/testmgr.h>

Inheritance diagram for VICI::cdi::AsyncTestCase:
VICI::cdi::AbstractTestCase VICI::cdi::AsyncTestCaseT< T >

Public Member Functions

 AsyncTestCase (csr name)
 Constructor. More...
 
- Public Member Functions inherited from VICI::cdi::AbstractTestCase
 AbstractTestCase (csr nm)
 Constructor. More...
 
virtual ~AbstractTestCase ()
 Destructor. More...
 
virtual bool operator() (ScenarioResults *)
 Execute the tests. More...
 

Protected Member Functions

virtual void initTest ()=0
 Initiate the test case. More...
 
virtual void handleEvent (TestEvent *ev)=0
 Handle the events. More...
 
virtual void timedOut ()=0
 Handle time out. More...
 
- Protected Member Functions inherited from VICI::cdi::AbstractTestCase
bool test (bool cond, csr testMsg, bool expected=false)
 Perform or record a test. More...
 

Protected Attributes

bool done
 This should be set by the handleEvent function.
 
std::chrono::steady_clock::time_point startTime
 The time when the test is started.
 
std::chrono::steady_clock::duration timeOut
 The time to wait. The default is 10 seconds.
 
- Protected Attributes inherited from VICI::cdi::AbstractTestCase
std::string name
 The name of the test case.
 
ScenarioResultsscenario
 Results for the scenario are placed in here.
 

Additional Inherited Members

- Static Public Attributes inherited from VICI::cdi::AbstractTestCase
static const bool EXPECTED = true
 Value for expected parameter of test()
 

Detailed Description

Responsible for handling asynchronous tests.

Constructor & Destructor Documentation

AsyncTestCase::AsyncTestCase ( csr  name)

Constructor.

Parameters
nameThe name of the test case.

Member Function Documentation

virtual void VICI::cdi::AsyncTestCase::handleEvent ( TestEvent ev)
protectedpure virtual

Handle the events.

When the object under test gets its call back it will queue an event which is passed to this function. Set done to true when the last expected event arrives.

Parameters
evThe test event.
virtual void VICI::cdi::AsyncTestCase::initTest ( )
protectedpure virtual

Initiate the test case.

The derived class should use this to start the test function. It should return immediately the test has been started.

virtual void VICI::cdi::AsyncTestCase::timedOut ( )
protectedpure virtual

Handle time out.

This gets called if the events don't arrive in time.


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