Change PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME conditional.

When no TEST_CASE_METHOD function, there is no fixture to get.
This commit is contained in:
Invincible 2020-03-23 10:24:10 +08:00 committed by Martin Hořeňovský
parent e5c9a58d66
commit 01bdfe3312
1 changed files with 1 additions and 1 deletions

View File

@ -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}")