Mjolnir Core
Core functionality of the Mjolnir API
|
◆ TYPED_TEST_SERIES
Value:
auto start_typed_test_series = []() \
{ \
auto test_series = []<UST... t_index>([[maybe_unused]] std::index_sequence<t_index...> seq) \
{ \
CREATE_TEST_CASE_INPUT_VALUES; \
/* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \
(void) std::initializer_list<I32>{(test_func_name<TypeParam, t_index>(TEST_CASE_ARGUMENTS), 0)...}; \
}; \
test_series(std::make_index_sequence<num_test_cases>()); \
}; \
start_typed_test_series()
std::size_t UST Unsigned integer type that is returned by sizeof operations. Definition: fundamental_types.h:29 Macro that generates a test series for typed tests. This macro can be used inside the body of a Since the test case index is a template parameter and therefore known at compile time, it can be used to derive other compile time constants like template parameters that should be used. Before you can use this macro, you need to define two other macros:
In case the test case function has no arguments, one would simply use: #define CREATE_TEST_CASE_INPUT_VALUES
#define TEST_CASE_ARGUMENTS
The corresponding test case function could look like this: template <typename T_Type, UST t_test_case_index>
void test_case_func()
{
...
}
|