diff --git a/src/catch2/internal/catch_preprocessor.hpp b/src/catch2/internal/catch_preprocessor.hpp index d0e9c235..a93d4f57 100644 --- a/src/catch2/internal/catch_preprocessor.hpp +++ b/src/catch2/internal/catch_preprocessor.hpp @@ -1,3 +1,4 @@ + /* * Created by Jozef on 12/11/2018. * Copyright 2017 Two Blue Cubes Ltd. All rights reserved. @@ -97,7 +98,7 @@ #define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) #define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) #define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) -#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _4, _5, _6) +#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6) #define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) #define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) #define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) diff --git a/tests/SelfTest/Baselines/automake.sw.approved.txt b/tests/SelfTest/Baselines/automake.sw.approved.txt index c9fe3ede..cc531e1d 100644 --- a/tests/SelfTest/Baselines/automake.sw.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.approved.txt @@ -16,6 +16,9 @@ Nor would this :test-result: PASS #1912 -- test spec parser handles escaping :test-result: PASS #1913 - GENERATE inside a for loop should not keep recreating the generator :test-result: PASS #1913 - GENERATEs can share a line +:test-result: PASS #1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +:test-result: PASS #1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +:test-result: PASS #1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 :test-result: XFAIL #748 - captures with unexpected exceptions :test-result: PASS #809 :test-result: PASS #833 diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt index eb7bcc07..aed08153 100644 --- a/tests/SelfTest/Baselines/compact.sw.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -35,6 +35,9 @@ Generators.tests.cpp:: passed: i != j for: 1 != 3 Generators.tests.cpp:: passed: i != j for: 1 != 4 Generators.tests.cpp:: passed: i != j for: 2 != 3 Generators.tests.cpp:: passed: i != j for: 2 != 4 +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: +Misc.tests.cpp:: passed: Exception.tests.cpp:: failed: unexpected exception with message: 'answer := 42' with 1 message: 'expected exception' Exception.tests.cpp:: failed: unexpected exception with message: 'answer := 42'; expression was: thisThrows() with 1 message: 'expected exception' Exception.tests.cpp:: passed: thisThrows() with 1 message: 'answer := 42' diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt index 89e4a9d9..1b423428 100644 --- a/tests/SelfTest/Baselines/console.std.approved.txt +++ b/tests/SelfTest/Baselines/console.std.approved.txt @@ -1380,6 +1380,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 339 | 265 passed | 70 failed | 4 failed as expected -assertions: 1932 | 1780 passed | 131 failed | 21 failed as expected +test cases: 342 | 268 passed | 70 failed | 4 failed as expected +assertions: 1935 | 1783 passed | 131 failed | 21 failed as expected diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt index a9c4d46d..4b8d12f6 100644 --- a/tests/SelfTest/Baselines/console.sw.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.approved.txt @@ -302,6 +302,30 @@ Generators.tests.cpp:: PASSED: with expansion: 2 != 4 +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + ------------------------------------------------------------------------------- #748 - captures with unexpected exceptions outside assertions @@ -15124,6 +15148,6 @@ Misc.tests.cpp: Misc.tests.cpp:: PASSED: =============================================================================== -test cases: 339 | 249 passed | 86 failed | 4 failed as expected -assertions: 1949 | 1780 passed | 148 failed | 21 failed as expected +test cases: 342 | 252 passed | 86 failed | 4 failed as expected +assertions: 1952 | 1783 passed | 148 failed | 21 failed as expected diff --git a/tests/SelfTest/Baselines/console.swa4.approved.txt b/tests/SelfTest/Baselines/console.swa4.approved.txt index 26a53c23..7a40dace 100644 --- a/tests/SelfTest/Baselines/console.swa4.approved.txt +++ b/tests/SelfTest/Baselines/console.swa4.approved.txt @@ -302,6 +302,30 @@ Generators.tests.cpp:: PASSED: with expansion: 2 != 4 +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + +------------------------------------------------------------------------------- +#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 +------------------------------------------------------------------------------- +Misc.tests.cpp: +............................................................................... + +Misc.tests.cpp:: PASSED: + ------------------------------------------------------------------------------- #748 - captures with unexpected exceptions outside assertions @@ -482,6 +506,6 @@ Condition.tests.cpp:: FAILED: CHECK( true != true ) =============================================================================== -test cases: 23 | 18 passed | 3 failed | 2 failed as expected -assertions: 54 | 47 passed | 4 failed | 3 failed as expected +test cases: 26 | 21 passed | 3 failed | 2 failed as expected +assertions: 57 | 50 passed | 4 failed | 3 failed as expected diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt index 5e4669ec..162fb04b 100644 --- a/tests/SelfTest/Baselines/junit.sw.approved.txt +++ b/tests/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ - + @@ -35,6 +35,9 @@ Nor would this + + + FAILED: diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt index 43c8dfec..cdbed24a 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -1413,6 +1413,9 @@ Message.tests.cpp: + + + FAILED: diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt index 7123e139..63d56bce 100644 --- a/tests/SelfTest/Baselines/tap.sw.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -68,6 +68,12 @@ ok {test-number} - i != j for: 1 != 4 ok {test-number} - i != j for: 2 != 3 # #1913 - GENERATEs can share a line ok {test-number} - i != j for: 2 != 4 +# #1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0 +ok {test-number} - +# #1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0 +ok {test-number} - +# #1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0 +ok {test-number} - # #748 - captures with unexpected exceptions not ok {test-number} - unexpected exception with message: 'answer := 42' with 1 message: 'expected exception' # #748 - captures with unexpected exceptions @@ -3890,5 +3896,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..1941 +1..1944 diff --git a/tests/SelfTest/Baselines/teamcity.sw.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.approved.txt index 6d3023e5..40264a41 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.approved.txt @@ -34,6 +34,12 @@ Tricky.tests.cpp:|nexplicit failure with message:|n "1514"'] ##teamcity[testFinished name='#1913 - GENERATE inside a for loop should not keep recreating the generator' duration="{duration}"] ##teamcity[testStarted name='#1913 - GENERATEs can share a line'] ##teamcity[testFinished name='#1913 - GENERATEs can share a line' duration="{duration}"] +##teamcity[testStarted name='#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0'] +##teamcity[testFinished name='#1954 - 7 arg template test case sig compiles - 1, 1, 1, 1, 1, 0, 0' duration="{duration}"] +##teamcity[testStarted name='#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0'] +##teamcity[testFinished name='#1954 - 7 arg template test case sig compiles - 5, 1, 1, 1, 1, 0, 0' duration="{duration}"] +##teamcity[testStarted name='#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0'] +##teamcity[testFinished name='#1954 - 7 arg template test case sig compiles - 5, 3, 1, 1, 1, 0, 0' duration="{duration}"] ##teamcity[testStarted name='#748 - captures with unexpected exceptions'] Exception.tests.cpp:|nunexpected exception with messages:|n "answer := 42"|n "expected exception"- failure ignore as test marked as |'ok to fail|'|n'] Exception.tests.cpp:|nunexpected exception with messages:|n "answer := 42"|n "expected exception"|n REQUIRE_NOTHROW( thisThrows() )|nwith expansion:|n thisThrows()|n- failure ignore as test marked as |'ok to fail|'|n'] diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt index 2f6f01fc..a90439f7 100644 --- a/tests/SelfTest/Baselines/xml.sw.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.approved.txt @@ -305,6 +305,15 @@ Nor would this + + + + + + + + +
@@ -18109,7 +18118,7 @@ loose text artifact
- + - + diff --git a/tests/SelfTest/UsageTests/Misc.tests.cpp b/tests/SelfTest/UsageTests/Misc.tests.cpp index c3e39161..aa8829d9 100644 --- a/tests/SelfTest/UsageTests/Misc.tests.cpp +++ b/tests/SelfTest/UsageTests/Misc.tests.cpp @@ -482,4 +482,10 @@ TEST_CASE( "#1175 - Hidden Test", "[.]" ) { SUCCEED(); } +TEMPLATE_TEST_CASE_SIG("#1954 - 7 arg template test case sig compiles", "[regression][.compilation]", + ((int Tnx, int Tnu, int Tny, int Tph, int Tch, int Tineq, int Teq), Tnx, Tnu, Tny, Tph, Tch, Tineq, Teq), + (1, 1, 1, 1, 1, 0, 0), (5, 1, 1, 1, 1, 0, 0), (5, 3, 1, 1, 1, 0, 0)) { + SUCCEED(); +} + }} // namespace MiscTests