![]() |
UTPP
|
Defines maximum run time of a test. More...
#include <utpp.h>
Public Member Functions | |
template<typename R, typename P> | |
TimeConstraint (std::chrono::duration< R, P > t, const char *file, int line) | |
~TimeConstraint () | |
Defines maximum run time of a test.
UnitTest::TimeConstraint::TimeConstraint | ( | std::chrono::duration< R, P > | t, |
const char * | file, | ||
int | line ) |
Initializes a TimeConstraint object.
tmax | Maximum allowed duration |
file | Filename associated with this constraint |
line | Line 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.
|
inline |
If the timer is greater than allowed value it records a time constraint failure for the current test.