diff options
| author | Leitwolf | 2026-10-25 10:31:36 +0300 |
|---|---|---|
| committer | GitHub | 2026-10-25 10:31:36 +0300 |
| commit | d2e3e074bb2e1b8ffd9fc990d0b87667ea602f58 (patch) | |
| tree | 0bce4462b2e190c39b3e1c5f697e3e4abd1a5e2a /tests/TestScripts/DiscoverTests/TestPrepareCommandFragment.cmake | |
| parent | 13f81a480a93807c14dddb5abdb97355ced4d4c5 (diff) | |
| parent | 126dc333564cb72b5115d9a9242d66694694b6d0 (diff) | |
| download | catch3-d2e3e074bb2e1b8ffd9fc990d0b87667ea602f58.tar.gz | |
Merge pull request #18 from Progmasoft/build/catch3-identity
Give Catch3 its own build names and headers
Diffstat (limited to 'tests/TestScripts/DiscoverTests/TestPrepareCommandFragment.cmake')
| -rw-r--r-- | tests/TestScripts/DiscoverTests/TestPrepareCommandFragment.cmake | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/TestScripts/DiscoverTests/TestPrepareCommandFragment.cmake b/tests/TestScripts/DiscoverTests/TestPrepareCommandFragment.cmake index cfcaf0d1..a36b0191 100644 --- a/tests/TestScripts/DiscoverTests/TestPrepareCommandFragment.cmake +++ b/tests/TestScripts/DiscoverTests/TestPrepareCommandFragment.cmake @@ -1,27 +1,27 @@ # SPDX-License-Identifier: BSL-1.0 -# Unit tests for `prepare_command_fragment` helper in `extras/CatchAddTests.cmake`. +# Unit tests for `catch3_prepare_command_fragment` helper in `extras/Catch3AddTests.cmake`. # # Yes, we are at the stage where the script helpers need unit tests. # # Run as -# cmake -DCATCH_ADD_TESTS_SCRIPT=/path/to/extras/CatchAddTests.cmake \ +# cmake -DCATCH3_ADD_TESTS_SCRIPT=/path/to/extras/Catch3AddTests.cmake \ # -P TestPrepareCommandFragment.cmake cmake_minimum_required(VERSION 3.19) -if(NOT DEFINED CATCH_ADD_TESTS_SCRIPT) - message(FATAL_ERROR "Missing argument `CATCH_ADD_TESTS_SCRIPT`") +if(NOT DEFINED CATCH3_ADD_TESTS_SCRIPT) + message(FATAL_ERROR "Missing argument `CATCH3_ADD_TESTS_SCRIPT`") endif() -if(NOT EXISTS "${CATCH_ADD_TESTS_SCRIPT}") - message(FATAL_ERROR "Cannot find CatchAddTests.cmake at '${CATCH_ADD_TESTS_SCRIPT}'") +if(NOT EXISTS "${CATCH3_ADD_TESTS_SCRIPT}") + message(FATAL_ERROR "Cannot find Catch3AddTests.cmake at '${CATCH3_ADD_TESTS_SCRIPT}'") endif() # Pull in the helper functions. Without `TEST_EXECUTABLE` being defined, -# `catch_discover_tests_impl` is not called. -include("${CATCH_ADD_TESTS_SCRIPT}") +# `catch3_discover_tests_impl` is not called. +include("${CATCH3_ADD_TESTS_SCRIPT}") set(_failures 0) @@ -37,25 +37,25 @@ function(expect_equal description actual expected) endif() endfunction() -prepare_command_fragment(test_fragment SimpleName /path/to/tests) +catch3_prepare_command_fragment(test_fragment SimpleName /path/to/tests) expect_equal("Simple arg, no quotes" "${test_fragment}" " SimpleName /path/to/tests") -prepare_command_fragment(test_fragment "Name with spaces") +catch3_prepare_command_fragment(test_fragment "Name with spaces") expect_equal("Spaces in arg, needs quotes" "${test_fragment}" " [==[Name with spaces]==]") -prepare_command_fragment(test_fragment Foo PROPERTIES LABELS "tagA\;tagB\;tagC") +catch3_prepare_command_fragment(test_fragment Foo PROPERTIES LABELS "tagA\;tagB\;tagC") expect_equal("semicolons in argument are kept and quoted" "${test_fragment}" " Foo PROPERTIES LABELS [==[tagA\;tagB\;tagC]==]") set(test_fragment "PRE-EXISTING") -prepare_command_fragment(test_fragment Foo PROPERTIES BAR baz) +catch3_prepare_command_fragment(test_fragment Foo PROPERTIES BAR baz) expect_equal("out var does no accumulate commands" "${test_fragment}" " Foo PROPERTIES BAR baz") if(_failures GREATER 0) - message(FATAL_ERROR "${_failures} prepare_command_fragment test(s) failed") + message(FATAL_ERROR "${_failures} catch3_prepare_command_fragment test(s) failed") else() - message(STATUS "All prepare_command_fragment tests passed") + message(STATUS "All catch3_prepare_command_fragment tests passed") endif() |