Skip to content

Commit

Permalink
Change PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME conditional.
Browse files Browse the repository at this point in the history
When no TEST_CASE_METHOD function, there is no fixture to get.
  • Loading branch information
Invincibl-e authored and horenmar committed Mar 27, 2020
1 parent e5c9a58 commit 01bdfe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/ParseAndAddCatchTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 01bdfe3

Please sign in to comment.