Jameo Core Library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
jm::TestVector Class Reference

A TestVector is a collection of several tests and will execute them all and return the number of errors on execution. More...

Public Member Functions

 TestVector (int argc, const char *argv[])
 Constructor.
 
 ~TestVector ()
 Destructor.
 
void addTest (Test *test)
 Adds test to the test vector.
 
size_t execute ()
 Executes the test vector.
 

Detailed Description

A TestVector is a collection of several tests and will execute them all and return the number of errors on execution.

This class needs the parameter argc and \argv which are typically provides vom the entry method int main() on every operating system.

When passing arguments to the executable from the command line, the argument shall be the 0 based index of a single test which will be executed. If no argument is provided, all tests will be done. With this possibility you can focus on a single test when developing and testing test classes by passing the number to the executable.

Constructor & Destructor Documentation

◆ TestVector()

jm::TestVector::TestVector ( int  argc,
const char *  argv[] 
)

Constructor.

Parameters
argc1st parameter from int main()
argv2nd parameter from int maint()

◆ ~TestVector()

jm::TestVector::~TestVector ( )

Destructor.

Member Function Documentation

◆ addTest()

void jm::TestVector::addTest ( Test test)

Adds test to the test vector.

Parameters
testThe test to be added.

◆ execute()

size_t jm::TestVector::execute ( )

Executes the test vector.

Returns
The number or errors. 0, if everything is ok.