catchorg / catchorg/Catch2

Allow tagging by TestType in TEMPLATE_TEST_CASE

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

Description

**Description**

In my own use case, I run tests of the kind:

```c++
TEMPLATE_TEST_CASE("MyTest", "[tag1][tag2]", float, double} {
[...]
}
```

where the tests are parameterised by the floating point precision.

I would love the ability to run just the float tests, or just the double tests, for example. However, at present it does not seem possible to tag by the `TestType`.

**Feature request:** allow for `TestType` to be used in the tag list, e.g.

```c++
TEMPLATE_TEST_CASE("MyTest", "[tag1][tag2][TestType]", float, double} {
[...]
}
```

thus allowing me to run: `./tests [float]` or `./tests [double]`.

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.