Class Test

Class Documentation

class Test
[source]

Abstract base class for a single runnable test.

The TEST() macro generates a subclass of Shell (which extends Test) that overrides test_body() with the test code. setup() and teardown() are called by run() before and after test_body(), respectively.

Public Functions

Test() noexcept = default
[source]
virtual ~Test() = default
[source]
virtual void run()
[source]

Execute this test, calling setup(), test_body(), and teardown().

virtual void setup()
[source]

Called before test_body(); override in a TEST_GROUP to set up fixtures.

virtual void teardown()
[source]

Called after test_body() (even on failure); override in a TEST_GROUP to release fixtures.

virtual void test_body()
[source]

The test body; overridden by the TEST() macro expansion.