|
libept
|
Test case that includes a fixture. More...
#include <tests.h>
Public Types | |
| typedef FIXTURE | Fixture |
Public Member Functions | |
| template<typename... Args> | |
| FixtureTestCase (const std::string &name, Args...args) | |
| void | setup () override |
| Set up the test case before it is run. More... | |
| void | teardown () override |
| Clean up after the test case is run. More... | |
| void | method_setup (TestMethodResult &mr) override |
| Set up before the test method is run. More... | |
| void | method_teardown (TestMethodResult &mr) override |
| Clean up after the test method is run. More... | |
| template<typename FUNC , typename... Args> | |
| void | add_method (const std::string &name, FUNC test_function, Args &&...args) |
| Add a method that takes a reference to the fixture as argument. More... | |
Public Member Functions inherited from ept::tests::TestCase | |
| TestCase (const std::string &name) | |
| virtual | ~TestCase () |
| virtual void | register_tests ()=0 |
| This will be called before running the test case, to populate it with its test methods. More... | |
| virtual TestCaseResult | run_tests (TestController &controller) |
| Call setup(), run all the tests that have been registered, then call teardown(). More... | |
| virtual TestMethodResult | run_test (TestController &controller, TestMethod &method) |
| Run a test method. More... | |
| template<typename... Args> | |
| void | add_method (const std::string &name, std::function< void()> test_function) |
| Register a new test method. More... | |
| template<typename... Args> | |
| void | add_method (const std::string &name, std::function< void()> test_function, Args &&...args) |
| Register a new test method. More... | |
| template<typename FUNC , typename... Args> | |
| void | add_method (const std::string &name, FUNC test_function, Args &&...args) |
| Register a new test metheod, with arguments. More... | |
Public Attributes | |
| Fixture * | fixture = 0 |
| std::function< Fixture *()> | make_fixture |
Public Attributes inherited from ept::tests::TestCase | |
| std::string | name |
| Name of the test case. More... | |
| std::vector< TestMethod > | methods |
| All registered test methods. More... | |
Test case that includes a fixture.
| typedef FIXTURE ept::tests::FixtureTestCase< FIXTURE >::Fixture |
|
inline |
|
inline |
Add a method that takes a reference to the fixture as argument.
Any extra arguments to the function will be passed to the test method after the fixture.
|
inlineoverridevirtual |
Set up before the test method is run.
Reimplemented from ept::tests::TestCase.
References ept::tests::TestCase::method_setup().
|
inlineoverridevirtual |
Clean up after the test method is run.
Reimplemented from ept::tests::TestCase.
References ept::tests::TestCase::method_teardown().
|
inlineoverridevirtual |
Set up the test case before it is run.
Reimplemented from ept::tests::TestCase.
References ept::tests::FixtureTestCase< FIXTURE >::make_fixture, and ept::tests::TestCase::setup().
|
inlineoverridevirtual |
Clean up after the test case is run.
Reimplemented from ept::tests::TestCase.
References ept::tests::FixtureTestCase< FIXTURE >::fixture, and ept::tests::TestCase::teardown().
| Fixture* ept::tests::FixtureTestCase< FIXTURE >::fixture = 0 |
Referenced by ept::tests::FixtureTestCase< FIXTURE >::teardown().
| std::function<Fixture*()> ept::tests::FixtureTestCase< FIXTURE >::make_fixture |
Referenced by ept::tests::FixtureTestCase< FIXTURE >::setup().
1.8.9.1