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

Base class for test cases. More...

#include <vici/testmgr.h>

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

Public Member Functions

 AbstractTestCase (csr nm)
 Constructor. More...
 
virtual ~AbstractTestCase ()
 Destructor. More...
 
virtual bool operator() (ScenarioResults *)
 Execute the tests. More...
 

Static Public Attributes

static const bool EXPECTED = true
 Value for expected parameter of test()
 

Protected Member Functions

bool test (bool cond, csr testMsg, bool expected=false)
 Perform or record a test. More...
 
virtual bool runTest ()=0
 Run the tests for the test case. More...
 

Protected Attributes

std::string name
 The name of the test case.
 
ScenarioResultsscenario
 Results for the scenario are placed in here.
 

Detailed Description

Base class for test cases.

Constructor & Destructor Documentation

VICI::cdi::AbstractTestCase::AbstractTestCase ( csr  nm)
inlineexplicit

Constructor.

Derived classes should perform any test case specific initialisations.

Parameters
nmThe name of the test case.
virtual VICI::cdi::AbstractTestCase::~AbstractTestCase ( )
inlinevirtual

Destructor.

Derived classes should perform test case specific clean up.

Member Function Documentation

bool AbstractTestCase::operator() ( ScenarioResults sr)
virtual

Execute the tests.

Returns
true if tests passed.
virtual bool VICI::cdi::AbstractTestCase::runTest ( )
protectedpure virtual

Run the tests for the test case.

Derived classes implement this to perform the required tests.

Returns
true if all tests passed.

Implemented in VICI::gth::DefaultTestCase.

bool AbstractTestCase::test ( bool  cond,
csr  testMsg,
bool  expected = false 
)
protected

Perform or record a test.

Parameters
condSet to true if test passes.
testMsgMessage to report when test fails
expectedSet to EXPECTED if test is expected to fail.
Returns
true if test passes, or failed and was expected to fail

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