mirror of
https://github.com/catchorg/Catch2.git
synced 2025-11-13 09:59:32 +01:00
Allow using only types in TEMPLATE_TEST_CASE_SIG. (#2995)
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
---------
Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
This commit is contained in:
@@ -634,6 +634,14 @@
|
||||
##teamcity[testFinished name='TemplateTest: vectors can be sized and resized - std::string' duration="{duration}"]
|
||||
##teamcity[testStarted name='TemplateTest: vectors can be sized and resized - std::tuple<int,float>']
|
||||
##teamcity[testFinished name='TemplateTest: vectors can be sized and resized - std::tuple<int,float>' duration="{duration}"]
|
||||
##teamcity[testStarted name='TemplateTestSig: compiles with a single int parameter - 1']
|
||||
##teamcity[testFinished name='TemplateTestSig: compiles with a single int parameter - 1' duration="{duration}"]
|
||||
##teamcity[testStarted name='TemplateTestSig: compiles with a single int parameter - 3']
|
||||
##teamcity[testFinished name='TemplateTestSig: compiles with a single int parameter - 3' duration="{duration}"]
|
||||
##teamcity[testStarted name='TemplateTestSig: compiles with a single int parameter - 6']
|
||||
##teamcity[testFinished name='TemplateTestSig: compiles with a single int parameter - 6' duration="{duration}"]
|
||||
##teamcity[testStarted name='TemplateTestSig: compiles with two type parameters - int,int']
|
||||
##teamcity[testFinished name='TemplateTestSig: compiles with two type parameters - int,int' duration="{duration}"]
|
||||
##teamcity[testStarted name='TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6']
|
||||
##teamcity[testFinished name='TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6' duration="{duration}"]
|
||||
##teamcity[testStarted name='TemplateTestSig: vectors can be sized and resized - float,4']
|
||||
|
||||
Reference in New Issue
Block a user