DCMTK  Version 3.6.2
OFFIS DICOM Toolkit
Public Types | Public Member Functions | Private Attributes | List of all members
OFTestTest Class Referenceabstract

A single test case which can be run. More...

Public Types

enum  E_Flags { , EF_Slow = 0x1 }
 Special flags that a test can have. More...
 
typedef OFList< OFStringTestResult
 This is the type used for test results.
 

Public Member Functions

 OFTestTest (const OFString &testName, int flag)
 Contructor. More...
 
virtual ~OFTestTest ()
 Destructor.
 
int flags () const
 
const OFStringgetTestName () const
 
const TestResultrunAndReturn ()
 Execute this test case. More...
 
virtual void run ()=0
 Execute this test case. More...
 
void recordFailure (const OFString &file, unsigned long int line, const OFString &message)
 Add a new failure to the result set. More...
 

Private Attributes

OFString testName_
 The unique name of this test.
 
TestResult results_
 The test results, empty for success.
 
const int flags_
 Flags that this test has.
 

Detailed Description

A single test case which can be run.

Member Enumeration Documentation

◆ E_Flags

Special flags that a test can have.

The flags for a test are the result of a bitwise or of these individual flags.

Enumerator
EF_Slow 

Slow test which should only be run in exhaustive mode.

Constructor & Destructor Documentation

◆ OFTestTest()

OFTestTest::OFTestTest ( const OFString testName,
int  flag 
)
inline

Contructor.

Parameters
testNamethe name of this test case

Member Function Documentation

◆ flags()

int OFTestTest::flags ( ) const
inline
Returns
the flags of this test case

References flags_.

◆ getTestName()

const OFString& OFTestTest::getTestName ( ) const
inline
Returns
the name of this test case

References testName_.

Referenced by OFTestManager::testMatches().

◆ recordFailure()

void OFTestTest::recordFailure ( const OFString file,
unsigned long int  line,
const OFString message 
)
inline

Add a new failure to the result set.

Parameters
resultlist of test failures
filefilename for this failure
lineline number for this failure
messageerror description.

References OFList< T >::push_back(), results_, and testName_.

◆ run()

virtual void OFTestTest::run ( )
pure virtual

Execute this test case.

Parameters
resultthe list of error messages generated by this test.
See also
OFCHECK(condition)

Referenced by runAndReturn().

◆ runAndReturn()

const TestResult& OFTestTest::runAndReturn ( )
inline

Execute this test case.

Returns
Reference to list of errors.

References OFList< T >::clear(), results_, and run().


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


Generated on Mon Jul 17 2017 for DCMTK Version 3.6.2 by Doxygen 1.8.13