Catch2 icon indicating copy to clipboard operation
Catch2 copied to clipboard

Improve test-naming abilities for parameterized tests

Open tophyr opened this issue 1 year ago • 5 comments

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 https://github.com/catchorg/Catch2/issues/2542

tophyr avatar Nov 30 '23 07:11 tophyr

Codecov Report

Merging #2771 (df90ea3) into devel (53d0d91) will increase coverage by 0.04%. The diff coverage is 100.00%.

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     

codecov[bot] avatar Nov 30 '23 08:11 codecov[bot]

I've ended up eliminating the RTTI sections of this PR - users can look up RTTI in their IndexedTestTypeName<> implementations if they choose. The compiler differences around RTTI complicate testing to the point that I'll stick that stuff in a different PR.

tophyr avatar Dec 05 '23 03:12 tophyr

@horenmar when you get some time, would love eyes on this and any feedback or thoughts.

tophyr avatar Dec 05 '23 03:12 tophyr

Rebased to 3.5.0

tophyr avatar Dec 11 '23 14:12 tophyr

pingping @horenmar

tophyr avatar Mar 15 '24 18:03 tophyr