catchorg / catchorg/Catch2

Platform specific tags to test cases/sections

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

Description

Sometimes it can be useful to only run specific test cases or sections on specific platforms or have them behave differently based on the platform.

It might be useful to have catch add a platform specific tag so test cases or sections with that tag will only run on that specific platform. Tag names could be something like *Clang*, *64-bit*, *FreeBSD* or similar.

I know that this can currently be handled by ugly `#ifdef`s in the code, but it might be useful to have some builtin way to handle it.

Not sure if tags is the way to go, whether this should be handled differently or maybe not at all.

A specific use case could be some functionality currently only implemented on one platform which should therefore only be tested on that platform, but I could imagine this might be useful in other cases as well.

Please let me know if this might make any sense.

Thanks a lot.

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.