OTest2
A C++ testing framework
Public Member Functions | List of all members
OTest2::RunnerResult Class Reference

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...
 
RunnerResultoperator= (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...
 

Detailed Description

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.

Definition at line 40 of file runner.h.

Constructor & Destructor Documentation

◆ RunnerResult() [1/3]

OTest2::RunnerResult::RunnerResult ( )

Default ctor - finished failed result.

Definition at line 27 of file runner.cpp.

◆ RunnerResult() [2/3]

OTest2::RunnerResult::RunnerResult ( bool  running_,
bool  result_,
int  delay_ms_ 
)

Ctor.

Parameters
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.

◆ RunnerResult() [3/3]

OTest2::RunnerResult::RunnerResult ( const RunnerResult src_)

Copy ctor.

Definition at line 45 of file runner.cpp.

◆ ~RunnerResult()

OTest2::RunnerResult::~RunnerResult ( )

Dtor.

Definition at line 53 of file runner.cpp.

Member Function Documentation

◆ getDelayMS()

int OTest2::RunnerResult::getDelayMS ( ) const

Get delay between two steps in milliseconds.

Note
This value is valid only if isFinished() is false!

Definition at line 75 of file runner.cpp.

◆ getResult()

bool OTest2::RunnerResult::getResult ( ) const

Get result of the test - true if the test has passed.

Note
This value is valid only if isFinished() is true!

Definition at line 80 of file runner.cpp.

◆ isFinished()

bool OTest2::RunnerResult::isFinished ( ) const

Check whether the test has already finished.

Definition at line 71 of file runner.cpp.

◆ operator=()

RunnerResult & OTest2::RunnerResult::operator= ( const RunnerResult src_)

Copy operator.

Definition at line 64 of file runner.cpp.

◆ swap()

void OTest2::RunnerResult::swap ( RunnerResult r2_)
noexcept

Swap contents.

Definition at line 57 of file runner.cpp.


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