Mjolnir Core
Core functionality of the Mjolnir API
typed_test_series.h
Go to the documentation of this file.
1 
7 
8 #pragma once
9 
10 
13 
14 #ifndef STATIC_ANALYSIS
15 
68 // NOLINTNEXTLINE
69 # define TYPED_TEST_SERIES(test_func_name, num_test_cases) \
70  auto start_typed_test_series = []() \
71  { \
72  auto test_series = []<UST... t_index>([[maybe_unused]] std::index_sequence<t_index...> seq) \
73  { \
74  CREATE_TEST_CASE_INPUT_VALUES; \
75  /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \
76  (void) std::initializer_list<I32>{(test_func_name<TypeParam, t_index>(TEST_CASE_ARGUMENTS), 0)...}; \
77  }; \
78  test_series(std::make_index_sequence<num_test_cases>()); \
79  }; \
80  start_typed_test_series()
81 #else
82 // NOLINTNEXTLINE
83 # define TYPED_TEST_SERIES(test_func_name, num_test_cases) \
84  CREATE_TEST_CASE_INPUT_VALUES; \
85  test_func_name<TypeParam, 0>(TEST_CASE_ARGUMENTS) // NOLINT(bugprone-macro-parentheses)
86 #endif
87 
88