Catch2 icon indicating copy to clipboard operation
Catch2 copied to clipboard

Testing product of template parameters

Open igtrnt opened this issue 3 years ago • 1 comments

Description Say I want to test std::array<T, N> for certain list of Ts and Ns.

E.g., for T = char, short, int, long and N = 1, 2, 3, 4, 5. Total of 20 combinations.

In my understanding TEMPLATE_PRODUCT_TEST_CASE_SIG is not suitable for that. (If it is, then the documentation is not clear).

Does Catch2 have functionality for products like this, so the example above would require listing 4 and 5 template parameters along respective dimensions (and not all 20 cases which I have to do with TEMPLATE_TEST_CASE_SIG) ?

igtrnt avatar Jan 20 '23 19:01 igtrnt