libwreport  3.29
Public Member Functions | Static Public Member Functions | Data Fields
wreport::tests::TestRegistry Struct Reference

Test registry. More...

#include <testrunner.h>

Public Member Functions

void register_test_case (TestCase &test_case)
 Register a new test case. More...
 
void iterate_test_methods (std::function< void(const TestCase &, const TestMethod &)>)
 Iterate on all test methods known by this registry. More...
 
std::vector< TestCaseResultrun_tests (TestController &controller)
 Run all the registered tests using the given controller.
 

Static Public Member Functions

static TestRegistryget ()
 Get the singleton instance of TestRegistry.
 

Data Fields

std::vector< TestCase * > entries
 All known test cases.
 

Detailed Description

Test registry.

It collects information about all known test cases and takes care of running them.

Member Function Documentation

◆ iterate_test_methods()

void wreport::tests::TestRegistry::iterate_test_methods ( std::function< void(const TestCase &, const TestMethod &)>  )

Iterate on all test methods known by this registry.

This method does not change the tests, but it cannot be const because it calls register_tests_once on each TestCase.

◆ register_test_case()

void wreport::tests::TestRegistry::register_test_case ( TestCase test_case)

Register a new test case.

No memory management is done: test_case needs to exist for the whole lifetime of TestRegistry.


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