Define TEST_ORDERED

Define Documentation

TEST_ORDERED(testGroup, testName, testLevel)
[source]

Define a test that runs at a specific position relative to other ordered tests.

Like TEST(), but execution is deferred until all unordered tests have run. Among ordered tests, those with a lower testLevel run first. Tests with equal levels run in an unspecified order relative to each other.

TEST_ORDERED(Lifecycle, init,    10) { system_init(); }
TEST_ORDERED(Lifecycle, run,     20) { system_run(); }
TEST_ORDERED(Lifecycle, cleanup, 30) { system_cleanup(); }

Use TEST_ORDERED_C_WRAPPER for bridging C test functions.

Parameters:
  • testGroup – Test group (must be declared with TEST_GROUP beforehand).

  • testName – Unique test name within the group.

  • testLevel – Integer level; lower values run first.