|
ZeroErr
|
#include "zeroerr/internal/config.h"#include <chrono>#include <functional>#include <string>#include <vector>

类 | |
| class | zeroerr::TestContext |
| TestContext is a class that holds the test results and reporter context. There are 8 different matrices that are used to store the test results. 更多... | |
| struct | zeroerr::UnitTest |
| UnitTest is a class that holds the test configuration. There are several options that can be set to configure the test. 更多... | |
| struct | zeroerr::TestCase |
| TestCase is a class that holds the test case information. There are several fields that are used to store the test case information. 更多... | |
| struct | zeroerr::SubCase |
| SubCase is a class that holds the subcase information. 更多... | |
| struct | zeroerr::TestedObjects< T > |
| class | zeroerr::IReporter |
| IReporter is an interface that is used to report the test results. You can create a new reporter by inheriting this class and implementing the virtual functions. The following events will be called once it happens during testing. 更多... | |
| struct | zeroerr::detail::regTest |
| regTest is a class that is used to register the test case. It will be used as global variables and the constructor will be called to register the test case. 更多... | |
| struct | zeroerr::detail::regReporter |
| regReporter is a class that is used to register the reporter. It will be used as global variables and the constructor will be called to register the reporter. 更多... | |
| class | zeroerr::CombinationalTest |
| CombinationalTest is a class that is used to cross test a few lists of arguments. One example 更多... | |
| class | zeroerr::TestArgs< T > |
| TestArgs is a class that is used to store the test arguments. 更多... | |
| class | zeroerr::Decorator |
命名空间 | |
| namespace | zeroerr |
| namespace | zeroerr::detail |
宏定义 | |
| #define | ZEROERR_CREATE_TEST_FUNC(function, name, ...) |
| #define | TEST_CASE(name, ...) ZEROERR_CREATE_TEST_FUNC(ZEROERR_NAMEGEN(_zeroerr_testcase), name, __VA_ARGS__) |
| #define | SUB_CASE(name, ...) |
| #define | ZEROERR_CREATE_TEST_CLASS(fixture, classname, funcname, name, ...) |
| #define | TEST_CASE_FIXTURE(fixture, name, ...) |
| #define | ZEROERR_HAVE_SAME_OUTPUT _ZEROERR_TEST_CONTEXT->save_output(); |
| #define | SCENARIO(...) TEST_CASE("Scenario: " __VA_ARGS__) |
| #define | GIVEN(...) SUB_CASE("given: " __VA_ARGS__) |
| #define | WHEN(...) SUB_CASE("when: " __VA_ARGS__) |
| #define | THEN(...) SUB_CASE("then: " __VA_ARGS__) |
枚举 | |
| enum | zeroerr::TestType { zeroerr::test_case = 1 , zeroerr::sub_case = 1 << 1 , zeroerr::bench = 1 << 2 , zeroerr::fuzz_test = 1 << 3 } |
| TestType is a enum describe the type of the test case. 更多... | |
函数 | |
| Decorator * | zeroerr::skip (bool isSkip) |
| Decorator * | zeroerr::timeout (float timeout) |
| Decorator * | zeroerr::may_fail (bool isMayFail) |
| Decorator * | zeroerr::should_fail (bool isShouldFail) |
| #define GIVEN | ( | ... | ) | SUB_CASE("given: " __VA_ARGS__) |
| #define SCENARIO | ( | ... | ) | TEST_CASE("Scenario: " __VA_ARGS__) |
| #define SUB_CASE | ( | name, | |
| ... | |||
| ) |
| #define TEST_CASE | ( | name, | |
| ... | |||
| ) | ZEROERR_CREATE_TEST_FUNC(ZEROERR_NAMEGEN(_zeroerr_testcase), name, __VA_ARGS__) |
| #define TEST_CASE_FIXTURE | ( | fixture, | |
| name, | |||
| ... | |||
| ) |
| #define THEN | ( | ... | ) | SUB_CASE("then: " __VA_ARGS__) |
| #define WHEN | ( | ... | ) | SUB_CASE("when: " __VA_ARGS__) |
| #define ZEROERR_CREATE_TEST_CLASS | ( | fixture, | |
| classname, | |||
| funcname, | |||
| name, | |||
| ... | |||
| ) |
| #define ZEROERR_CREATE_TEST_FUNC | ( | function, | |
| name, | |||
| ... | |||
| ) |
| #define ZEROERR_HAVE_SAME_OUTPUT _ZEROERR_TEST_CONTEXT->save_output(); |