Test
#include <icy/test.h>
class TestDefined in src/base/include/icy/test.h:81
- Subclassed by
FunctionTest
This class is for implementing any kind of unit test that can be executed by a TestRunner.
Friends
| Name | Description |
|---|---|
TestRunner | Tests belong to a TestRunner instance. |
TestRunner
friend class TestRunnerDefined in src/base/include/icy/test.h:110
Tests belong to a TestRunner instance.
Public Attributes
| Return | Name | Description |
|---|---|---|
std::string | name | The name of the test. |
SErrorist | errors | A list of test errors. |
double | duration | The test run duration for benchmarking. |
name
std::string nameDefined in src/base/include/icy/test.h:97
The name of the test.
errors
SErrorist errorsType: SErrorist
Defined in src/base/include/icy/test.h:100
A list of test errors.
duration
double durationDefined in src/base/include/icy/test.h:103
The test run duration for benchmarking.
Public Methods
| Return | Name | Description |
|---|---|---|
Test | ||
~Test virtual | Should remain protected. | |
void | run virtual | Called by the TestRunner to run the test. |
bool | passed | Return true when the test passed without errors. |
Test
Test(const std::string & name = "Unnamed Test")Defined in src/base/include/icy/test.h:85
Parameters
| Parameter | Type | Description |
|---|---|---|
name | const std::string & | Human-readable name displayed in test output. |
~Test
virtual
virtual ~Test()Defined in src/base/include/icy/test.h:88
Should remain protected.
run
virtual
virtual void run()Defined in src/base/include/icy/test.h:91
Called by the TestRunner to run the test.
Reimplemented by
passed
bool passed()Defined in src/base/include/icy/test.h:94
Return true when the test passed without errors.
Protected Methods
Test
Test(const Test & test) = deleteDefined in src/base/include/icy/test.h:106
Deleted constructor.
operator=
Test & operator=(Test const &) = deleteDefined in src/base/include/icy/test.h:107
Deleted assignment operator.
