catchorg / catchorg/Catch2

Enable to define the class name in the test case

Open
#1,972 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

I had a situation where I had a C ++ source file with several test cases and I wanted to be able to define the class name of some of them when using JUnit output. There is the `--filenames-as-tags` option, but I wanted a different name from the file name. Also, I didn't want to split my test cases into multiple files just to have different class names. Would be great to be able to set the class name in this situations.

To solve this problem quickly I introduced a new special tag prefixed with `:` (colon) that works in the same way as tags prefixed with `#`. The difference is that the user can define this new tag. I could just remove the restriction on `#`, but I chose not to change that behavior. I can make a push request with this change if people find it useful.

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.