diff options
6 files changed, 24 insertions, 10 deletions
diff --git a/Modules/GoogleTestAddTests.cmake b/Modules/GoogleTestAddTests.cmake index a10b5d0..671127a 100644 --- a/Modules/GoogleTestAddTests.cmake +++ b/Modules/GoogleTestAddTests.cmake @@ -136,7 +136,7 @@ function(gtest_discover_tests_impl) # Module; remove trailing '.' to get just the name... string(REGEX REPLACE "\\.( *#.*)?$" "" suite "${line}") if(line MATCHES "#" AND NOT _NO_PRETTY_TYPES) - string(REGEX REPLACE "/[0-9]\\.+ +#.*= +" "/" pretty_suite "${line}") + string(REGEX REPLACE "/[0-9]+\\.+ +#.*= +" "/" pretty_suite "${line}") else() set(pretty_suite "${suite}") endif() diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-arg-change-typed-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-arg-change-typed-stdout.txt index fe8f273..f21e579 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-arg-change-typed-stdout.txt +++ b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-arg-change-typed-stdout.txt @@ -1,7 +1,9 @@ Test project .*/Tests/RunCMake/GoogleTest/GoogleTest-discovery-arg-change - Test #1: typed/short\.case - Test #2: typed/float\.case - Test #3: ns\.typed/short\.case - Test #4: ns\.typed/float\.case + Test #[0-9]+: typed/short\.case + Test #[0-9]+: typed/float\.case + Test #[0-9]+: typed/char\.case + Test #[0-9]+: ns\.typed/short\.case + Test #[0-9]+: ns\.typed/float\.case + Test #[0-9]+: ns\.typed/char\.case -Total Tests: 4 +Total Tests: [0-9]+ diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt index 01b39c3..e5b44a9 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt +++ b/Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt @@ -23,10 +23,14 @@ Test project .* *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:typed/short\.case!1 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:typed/float\.case!1 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:typed/float\.case!1 \.+ +Passed +[0-9.]+ sec + *Start +[0-9]+: TEST:typed/char\.case!1 + *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:typed/char\.case!1 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:ns\.typed/short\.case!1 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.typed/short\.case!1 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:ns\.typed/float\.case!1 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.typed/float\.case!1 \.+ +Passed +[0-9.]+ sec + *Start +[0-9]+: TEST:ns\.typed/char\.case!1 + *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.typed/char\.case!1 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:value/test\.case/1!1 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:value/test\.case/1!1 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:value/test\.case/"foo"!1 diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt index 796e20c..71dba89 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt +++ b/Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt @@ -23,10 +23,14 @@ Test project .* *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:typed/short\.case!2 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:typed/float\.case!2 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:typed/float\.case!2 \.+ +Passed +[0-9.]+ sec + *Start +[0-9]+: TEST:typed/char\.case!2 + *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:typed/char\.case!2 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:ns\.typed/short\.case!2 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.typed/short\.case!2 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:ns\.typed/float\.case!2 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.typed/float\.case!2 \.+ +Passed +[0-9.]+ sec + *Start +[0-9]+: TEST:ns\.typed/char\.case!2 + *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.typed/char\.case!2 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:value/test\.case/1!2 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:value/test\.case/1!2 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:value/test\.case/"foo"!2 diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-test4-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-test4-stdout.txt index 0f7dde7..21f95e9 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTest-test4-stdout.txt +++ b/Tests/RunCMake/GoogleTest/GoogleTest-test4-stdout.txt @@ -3,10 +3,14 @@ Test project .* *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:typed/short\.case!4 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:typed/float\.case!4 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:typed/float\.case!4 \.+ +Passed +[0-9.]+ sec + *Start +[0-9]+: TEST:typed/char\.case!4 + *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:typed/char\.case!4 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:ns\.typed/short\.case!4 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.typed/short\.case!4 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:ns\.typed/float\.case!4 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.typed/float\.case!4 \.+ +Passed +[0-9.]+ sec + *Start +[0-9]+: TEST:ns\.typed/char\.case!4 + *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.typed/char\.case!4 \.+ +Passed +[0-9.]+ sec 100% tests passed, 0 tests failed out of [0-9]+ diff --git a/Tests/RunCMake/GoogleTest/fake_gtest.cpp b/Tests/RunCMake/GoogleTest/fake_gtest.cpp index 183e106..e6f74aa 100644 --- a/Tests/RunCMake/GoogleTest/fake_gtest.cpp +++ b/Tests/RunCMake/GoogleTest/fake_gtest.cpp @@ -36,11 +36,11 @@ int main(int argc, char** argv) if (!is_basic_only) { const char* typed_suite_names[] = { "typed", "ns.typed" }; for (size_t i = 0; i < ARRAY_SIZE(typed_suite_names); i++) { - std::cout << typed_suite_names[i] << "/0. # TypeParam = short" - << std::endl; + std::cout << typed_suite_names[i] << "/0. # TypeParam = short\n"; std::cout << " case" << std::endl; - std::cout << typed_suite_names[i] << "/1. # TypeParam = float" - << std::endl; + std::cout << typed_suite_names[i] << "/1. # TypeParam = float\n"; + std::cout << " case" << std::endl; + std::cout << typed_suite_names[i] << "/42. # TypeParam = char\n"; std::cout << " case" << std::endl; } } |