Class SkippedShell

Inheritance Relationships

Base Type

Class Documentation

class SkippedShell : public mu::tiny::test::Shell
[source]

Shell for a test that is skipped unless -r (run-ignored) is set.

Used by the SKIPPED_TEST() macro. The test body is still compiled and registered, but will_run() returns false until set_run_skipped() is called. See also SKIPPED_TEST_C_WRAPPER.

Public Functions

SkippedShell() noexcept
[source]

Construct an empty ignored shell (not yet registered).

~SkippedShell() override = default
[source]
explicit SkippedShell(const char *group_name, const char *test_name, const char *file_name, int_least32_t line_number) noexcept

Construct and register an ignored test.

Parameters:
  • group_name – Name of the test group.

  • test_name – Name of the individual test case.

  • file_name – Source file where the test is defined.

  • line_number – Line number of the test definition.

SkippedShell(const SkippedShell&) = delete
SkippedShell &operator=(const SkippedShell&) = delete
virtual bool will_run() const override
Returns:

false unless set_run_ignored() has been called.

virtual void set_run_skipped() override
[source]

Enable running this test (triggered by the -r flag).

Protected Functions

virtual String get_macro_name() const override
Returns:

The macro name reported in output ("SKIPPED_TEST").

virtual void run_one_test(Plugin *plugin, Result &result) override

Run the test body (only called when run-ignored mode is active).

Parameters:
  • plugin – The active plugin chain.

  • result – The active result accumulator.