Class Installer

Class Documentation

class Installer
[source]

Registers a Shell with the current Registry at construction time.

The TEST() and TEST_GROUP() macros create static Installer instances to auto-register each test shell before main() runs. Call un_do() to remove a shell that was registered by mistake (used internally by TestingFixture).

Public Functions

explicit Installer(Shell &shell, const char *group_name, const char *test_name, const char *file_name, int_least32_t line_number) noexcept

Register shell with the current Registry.

Parameters:
  • shell – The test shell to register.

  • 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.

virtual ~Installer() = default
[source]
Installer(const Installer&) = delete
Installer &operator=(const Installer&) = delete

Public Static Functions

static void un_do()
[source]

Remove the associated shell from the Registry.