Test
Test
#include <icy/test.h>class TestDefined in src/base/include/icy/test.h:81
Subclassed by:
FunctionTest
Test wrapper class.
This class is for implementing any kind of unit test that can be executed by a [TestRunner](icy-test-TestRunner.html#testrunner-1).
List of all members
| Name | Kind | Owner |
|---|---|---|
TestRunner | friend | Declared here |
name | variable | Declared here |
errors | variable | Declared here |
duration | variable | Declared here |
Test | function | Declared here |
~Test | function | Declared here |
run | function | Declared here |
passed | function | Declared here |
Test | function | Declared here |
operator= | function | Declared here |
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 errorsDefined 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
nameHuman-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
| Return | Name | Description |
|---|---|---|
Test | Deleted constructor. |
Test
Test(const Test & test) = deleteDefined in src/base/include/icy/test.h:106
Deleted constructor.
