Framework

The framework defines the go-to approach when wanting to use the mechanism that automatically registers test suites, test cases, and fixtures.

RX_SET_UP

Defines the initialization function of a fixture.

#define RX_SET_UP(id)

The name for this function needs to be passed to the id parameter and can then referenced through the set_up option available as part of the RX_FIXTURE macro.

RX_TEAR_DOWN

Defines the clean-up function of a fixture.

#define RX_TEAR_DOWN(id)

The name for this function needs to be passed to the id parameter and can then be referenced through the tear_down option available as part of the RX_FIXTURE macro.

RX_FIXTURE

Defines a fixture.

#define RX_FIXTURE(id, type, ...)

The name for this fixture needs to be passed to the id parameter and can then be referenced through the configuration of the RX_TEST_SUITE and the RX_TEST_CASE macros.

For a list of all the options available through the variadic parameter, see the rx_fixture_config struct.

If the fixture defines some data to be used by its test cases, its type needs to be passed to the type parameter. Otherwise, the alternative macro RX_VOID_FIXTURE should be used instead.

RX_VOID_FIXTURE

Defines a fixture without any user data.

#define RX_VOID_FIXTURE(id, ...)

The name for this fixture needs to be passed to the id parameter and can then be referenced through the configuration of the RX_TEST_SUITE and the RX_TEST_CASE macros.

RX_TEST_SUITE

Defines a test suite.

#define RX_TEST_SUITE(id, ...)

The name for this suite needs to be passed to the id parameter and can then be referenced by the RX_TEST_CASE macro.

For a list of all the options available through the variadic parameter, see the rx_test_case_config struct.

RX_TEST_CASE

Defines a test case function.

#define RX_TEST_CASE(suite_id, id, ...)

For a list of all the options available through the variadic parameter, see the rx_test_case_config struct.