Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorInvincible2020-03-23 10:24:10 +0800
committerMartin Hořeňovský2020-05-01 09:30:31 +0200
commit8ea45bf50cc806527caff9d61c8923740beafa8e (patch)
treee8f5751162c2af258234a6c1873014444c5b8841
parentbeb8c3a99dd365509baced07c4e8dc2fa8005ac8 (diff)
downloadcatch3-8ea45bf50cc806527caff9d61c8923740beafa8e.tar.gz
Change PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME conditional.
When no TEST_CASE_METHOD function, there is no fixture to get.
-rw-r--r--extras/ParseAndAddCatchTests.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/ParseAndAddCatchTests.cmake b/extras/ParseAndAddCatchTests.cmake
index 925d9328..3c551f07 100644
--- a/extras/ParseAndAddCatchTests.cmake
+++ b/extras/ParseAndAddCatchTests.cmake
@@ -144,7 +144,7 @@ function(ParseAndAddCatchTests_ParseFile SourceFile TestTarget)
if("${TestType}" STREQUAL "SCENARIO")
set(Name "Scenario: ${Name}")
endif()
- if(PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME AND TestFixture)
+ if(PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME AND "${TestType}" MATCHES "(CATCH_)?TEST_CASE_METHOD" AND TestFixture )
set(CTestName "${TestFixture}:${Name}")
else()
set(CTestName "${Name}")