diff options
author | Oleksii Odynochenko <oleksii.odynochenko@gmail.com> | 2022-10-11 09:20:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-11 14:20:23 (GMT) |
commit | 1d340d7cb2183e129f193e9bdbea83347d9a370f (patch) | |
tree | e63ab673cc3f20fb17680aa6d244d968195e6f1f /Modules/GoogleTest.cmake | |
parent | e21071ec4b2b46add5416eb1abeb8b6fbd7fddc6 (diff) | |
download | CMake-1d340d7cb2183e129f193e9bdbea83347d9a370f.zip CMake-1d340d7cb2183e129f193e9bdbea83347d9a370f.tar.gz CMake-1d340d7cb2183e129f193e9bdbea83347d9a370f.tar.bz2 |
GoogleTest: Add gtest-filter for TYPED_TEST_P
Diffstat (limited to 'Modules/GoogleTest.cmake')
-rw-r--r-- | Modules/GoogleTest.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/GoogleTest.cmake b/Modules/GoogleTest.cmake index f5f4f02..b8dc482 100644 --- a/Modules/GoogleTest.cmake +++ b/Modules/GoogleTest.cmake @@ -348,7 +348,7 @@ function(gtest_add_tests) unset(testList) set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+) *, *([A-Za-z_0-9]+) *\\).*") - set(gtest_test_type_regex "(TYPED_TEST|TEST_?[FP]?)") + set(gtest_test_type_regex "(TYPED_TEST|TEST)_?[FP]?") foreach(source IN LISTS ARGS_SOURCES) if(NOT ARGS_SKIP_DEPENDENCY) @@ -361,7 +361,9 @@ function(gtest_add_tests) # Parameterized tests have a different signature for the filter if("x${test_type}" STREQUAL "xTEST_P") - string(REGEX REPLACE ${gtest_case_name_regex} "*/\\1.\\2/*" gtest_test_name ${hit}) + string(REGEX REPLACE ${gtest_case_name_regex} "*/\\1.\\2/*" gtest_test_name ${hit}) + elseif("x${test_type}" STREQUAL "xTYPED_TEST_P") + string(REGEX REPLACE ${gtest_case_name_regex} "*/\\1/*.\\2" gtest_test_name ${hit}) elseif("x${test_type}" STREQUAL "xTEST_F" OR "x${test_type}" STREQUAL "xTEST") string(REGEX REPLACE ${gtest_case_name_regex} "\\1.\\2" gtest_test_name ${hit}) elseif("x${test_type}" STREQUAL "xTYPED_TEST") |