gtest_discover_tests misses out test suite name for type-parametrized tests
- CMake automatically creates test names with help of
gtest_discover_tests()
- The test names should be unique and match the naming in gtest
- CMake misses the test suite names for type-parametrized test suites
- The behavior has been introduced beween CMake version 3.19 and 3.23
- This patch from !6958 (merged) seems especially suspicious
- As a result type-parametrized tests cannot be addressed individually any longer
For example a test suite with the name TypeParametrizedTestsuite
is converted to a test name
-
TypePrefix/TypeParametrizedTestsuite/char.TypeTest
for CMake < 3.23 -
TypePrefix.TypeTest<char>
for CMake >= 3.23
given this output of ./testsuite --gtest_list_tests
:
TypePrefix/TypeParametrizedTestsuite/0. # TypeParam = char
TypeTest
A simple project to reproduce the issue can be found in this github repo.
Edited by Brad King