diff options
author | Craig Scott <craig.scott@crascit.com> | 2018-09-10 08:20:40 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2018-09-10 08:21:48 (GMT) |
commit | d6b06d8d876a1cd240f347cdebe527354cb6fd2a (patch) | |
tree | 24ebe17fc738776d11b28c2f32e7bf5f121ecf9d /Tests | |
parent | 0878a79414d4b7a0a24162c7365f188dba4a9bd4 (diff) | |
download | CMake-d6b06d8d876a1cd240f347cdebe527354cb6fd2a.zip CMake-d6b06d8d876a1cd240f347cdebe527354cb6fd2a.tar.gz CMake-d6b06d8d876a1cd240f347cdebe527354cb6fd2a.tar.bz2 |
GoogleTest: Modify test to verify that empty files can be scanned
The modified test confirms the bug described in issue #18321.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/GoogleTest/Test/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/GoogleTest/Test/empty.cxx | 0 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Tests/GoogleTest/Test/CMakeLists.txt b/Tests/GoogleTest/Test/CMakeLists.txt index f798d31..baf00d5 100644 --- a/Tests/GoogleTest/Test/CMakeLists.txt +++ b/Tests/GoogleTest/Test/CMakeLists.txt @@ -44,12 +44,13 @@ endif() set_tests_properties(set2.GoogleTest.ConditionalFail.foo PROPERTIES WILL_FAIL YES) -# Search specific sources to get the test list -add_executable(test_gtest2 main2.cxx) +# Search specific sources to get the test list. Include an empty file +# to ensure they are handled correctly too. +add_executable(test_gtest2 main2.cxx empty.cxx) target_link_libraries(test_gtest2 GTest::Main) gtest_add_tests(TARGET test_gtest2 TEST_LIST testList - SOURCES main2.h + SOURCES main2.h empty.cxx ) set(expectedTests GoogleTest.SomethingElse diff --git a/Tests/GoogleTest/Test/empty.cxx b/Tests/GoogleTest/Test/empty.cxx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/GoogleTest/Test/empty.cxx |