UTPP
Loading...
Searching...
No Matches
UnitTest::TimeConstraint Class Reference

Defines maximum run time of a test. More...

#include <utpp.h>

Public Member Functions

 TimeConstraint (int ms, const char *file, int line)
 
 ~TimeConstraint ()
 

Detailed Description

Defines maximum run time of a test.

Constructor & Destructor Documentation

◆ TimeConstraint()

UnitTest::TimeConstraint::TimeConstraint ( int ms,
const char * file,
int line )
inline

Initializes a TimeConstraint object.

Parameters
msMaximum allowed duration in milliseconds
fileFilename associated with this constraint
lineLine number associated with this constraint

The object contains a timer that is started now. It also keeps track of the filename and line number where it has been created.

◆ ~TimeConstraint()

UnitTest::TimeConstraint::~TimeConstraint ( )
inline

If the timer is greater than allowed value it records a time constraint failure for the current test.


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