-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve test-naming abilities for parameterized tests #2771
base: devel
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## devel #2771 +/- ##
==========================================
+ Coverage 91.51% 91.55% +0.04%
==========================================
Files 198 199 +1
Lines 8243 8246 +3
==========================================
+ Hits 7543 7549 +6
+ Misses 700 697 -3 |
cf9e52c
to
d6c0efe
Compare
e0e9e73
to
d6c0efe
Compare
I've ended up eliminating the RTTI sections of this PR - users can look up RTTI in their |
@horenmar when you get some time, would love eyes on this and any feedback or thoughts. |
Catch2 produces tests names with spaces by default when using type-parametric macros like `TEMPLATE_TEST_CASE` and `TEMPLATE_PRODUCT_TEST_CASE`. For some test-runners that are incompatible with spaces in test names, this presents a significant problem: It's possible to define a test that's impossible to run. This adds a `CATCH_CONFIG_NAME_SEPARATOR` configuration value that can be used to override the separator string used during test naming.
It's not often very useful to name tests simply by incrementing numbers. This change adds a mechanism by which a name can be generated using both the index of the type in the type list, and also some from the type itself somehow.
Rebased to 3.5.0 |
pingping @horenmar |
Catch2 generates names for the
TEMPLATE_*
style test definition macros, and the naming can be improved somewhat. This PR adds the ability to control the separator - for situations where external forces might preclude things like spaces in a test name - and also the ability to specify a string associated with a type for a template-list test.Addresses Issue #2542