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

Representation of a test case. More...

#include <utpp.h>

Public Member Functions

 Test (const std::string &testName)
 Constructor.
 
void no_time_constraint ()
 Flags the test as exempt from global time constraint.
 
bool is_time_constraint () const
 Return true if test must be run under global time constraints.
 
int failure_count () const
 Return the number of failures in this test.
 
int test_time_ms () const
 Return test running time in milliseconds.
 
const std::string & test_name () const
 Return test name.
 
void failure ()
 
void run ()
 
virtual void RunImpl ()
 Actual body of test.
 

Protected Attributes

std::string name
 Name of this test.
 
int failures
 Number of failures in this test.
 
int time
 Run time.
 
bool time_exempt
 true if exempt from time constraints
 

Friends

class TestSuite
 

Detailed Description

Representation of a test case.

Member Function Documentation

◆ failure()

void UnitTest::Test::failure ( )
inline

Increment failures count for this test

◆ run()

void UnitTest::Test::run ( )
inline

Starts a timer and calls RunImpl() to execute test code.

When RunImpl() returns, it records the elapsed time.


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