catchorg / catchorg/Catch2

Testing product of template parameters

Open
#2,629 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

**Description**
Say I want to test `std::array` for certain list of `T`s and `N`s.

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`) ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.