OTest2
A C++ testing framework
|
Result of test run. More...
#include <runner.h>
Public Member Functions | |
RunnerResult () | |
Default ctor - finished failed result. More... | |
RunnerResult (bool running_, bool result_, int delay_ms_) | |
Ctor. More... | |
RunnerResult (const RunnerResult &src_) | |
Copy ctor. More... | |
~RunnerResult () | |
Dtor. More... | |
void | swap (RunnerResult &r2_) noexcept |
Swap contents. More... | |
RunnerResult & | operator= (const RunnerResult &src_) |
Copy operator. More... | |
bool | isFinished () const |
Check whether the test has already finished. More... | |
int | getDelayMS () const |
Get delay between two steps in milliseconds. More... | |
bool | getResult () const |
Get result of the test - true if the test has passed. More... | |
Result of test run.
This structure is returned by the runner after one test step. There are several possible results:
The user must check the isFinished() value. If the test is finished, he can get the test result by calling the getResult() method. If the test isn't finished, he must get the delay value getDelayMS(), wait for specified time (it can be zero!) and run the test runner again.
OTest2::RunnerResult::RunnerResult | ( | ) |
Default ctor - finished failed result.
Definition at line 27 of file runner.cpp.
OTest2::RunnerResult::RunnerResult | ( | bool | running_, |
bool | result_, | ||
int | delay_ms_ | ||
) |
Ctor.
running_ | True if the test hasn't finished yet. |
result_ | Result of the test. It's valid only if the running_ is false. |
delay_ms_ | Delay time in milliseconds. It's valid only if the running_ is true. |
Definition at line 34 of file runner.cpp.
OTest2::RunnerResult::RunnerResult | ( | const RunnerResult & | src_ | ) |
Copy ctor.
Definition at line 45 of file runner.cpp.
OTest2::RunnerResult::~RunnerResult | ( | ) |
Dtor.
Definition at line 53 of file runner.cpp.
int OTest2::RunnerResult::getDelayMS | ( | ) | const |
Get delay between two steps in milliseconds.
Definition at line 75 of file runner.cpp.
bool OTest2::RunnerResult::getResult | ( | ) | const |
Get result of the test - true if the test has passed.
Definition at line 80 of file runner.cpp.
bool OTest2::RunnerResult::isFinished | ( | ) | const |
Check whether the test has already finished.
Definition at line 71 of file runner.cpp.
RunnerResult & OTest2::RunnerResult::operator= | ( | const RunnerResult & | src_ | ) |
Copy operator.
Definition at line 64 of file runner.cpp.
|
noexcept |
Swap contents.
Definition at line 57 of file runner.cpp.