Skip to content

Allow using only types in TEMPLATE_TEST_CASE_SIG. #2995

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

Merged

Conversation

legrosbuffle
Copy link
Contributor

Right now TEMPLATE_TEST_CASE_SIG fails to compile when the signature contains only types:

TEMPLATE_TEST_CASE_SIG(
  "TemplateTestSig: compiles with two type parameters",
  "[template][onlytypes]",
  ((typename U, typename V), U, V), (int,int)) {}

The trick is to resolve the ambiguity between the two overloads of get_wrapper (TypeList and Nttp) by making one match more strongly. We also need to allow reg_test to register more than one type.

Add unit tests.

Fixes #2680

legrosbuffle and others added 3 commits June 30, 2025 12:29
Right now `TEMPLATE_TEST_CASE_SIG` fails to compile when the signature contains only types:

```
TEMPLATE_TEST_CASE_SIG(
  "TemplateTestSig: compiles with two type parameters",
  "[template][onlytypes]",
  ((typename U, typename V), U, V), (int,int)) {}
```

The trick is to resolve the ambiguity between the two overloads of
`get_wrapper` (`TypeList` and `Nttp`) by making one match more strongly.
We also need to allow `reg_test` to register more than one type.

Add unit tests.

Fixes catchorg#2680
@horenmar horenmar added the BugFix label Jul 7, 2025
Copy link

codecov bot commented Jul 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.99%. Comparing base (ceed268) to head (99a64e6).
Report is 5 commits behind head on devel.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #2995      +/-   ##
==========================================
- Coverage   91.14%   90.99%   -0.16%     
==========================================
  Files         198      198              
  Lines        8514     8609      +95     
==========================================
+ Hits         7760     7833      +73     
- Misses        754      776      +22     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@horenmar
Copy link
Member

horenmar commented Jul 8, 2025

Thanks. I made small changes for the tests to pass and to avoid polluting the global namespace with the priority tag.

@horenmar horenmar merged commit 2de12cb into catchorg:devel Jul 8, 2025
84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TEMPLATE_TEST_CASE_SIG multiple typename parameters in a row
2 participants