Compute Library
 22.11
TestSuiteRegistrar Class Referencefinal

Helper class to statically begin and end a test suite. More...

#include <Registrars.h>

Public Member Functions

 TestSuiteRegistrar ()
 Remove the last added test suite from the framework. More...
 
 TestSuiteRegistrar (std::string name)
 Add a new test suite with the given name to the framework. More...
 

Detailed Description

Helper class to statically begin and end a test suite.

Definition at line 66 of file Registrars.h.

Constructor & Destructor Documentation

◆ TestSuiteRegistrar() [1/2]

TestSuiteRegistrar ( )
inline

Remove the last added test suite from the framework.

Definition at line 100 of file Registrars.h.

References Framework::get(), and Framework::pop_suite().

101 {
103 }
void pop_suite()
Remove innermost test suite.
Definition: Framework.cpp:151
static Framework & get()
Access to the singleton.
Definition: Framework.cpp:124

◆ TestSuiteRegistrar() [2/2]

TestSuiteRegistrar ( std::string  name)
inline

Add a new test suite with the given name to the framework.

Parameters
[in]nameName of the test suite.

Definition at line 105 of file Registrars.h.

References Framework::get(), and Framework::push_suite().

106 {
107  Framework::get().push_suite(std::move(name));
108 }
static Framework & get()
Access to the singleton.
Definition: Framework.cpp:124
const char * name
void push_suite(std::string name)
Add a new test suite.
Definition: Framework.cpp:146

The documentation for this class was generated from the following file: