Tutorial: Step 4 improvements

Small changes to the text and CMake code for the fourth step of the
tutorial:

* Remove parameter from endfunction call
* Standardize on "binary directory" for test location
* Add additional information about a Release build.

Issue: #22663
This commit is contained in:
Joseph Snyder
2021-09-27 09:03:00 -04:00
committed by Brad King
parent 49392b591d
commit 5a86ce5428
10 changed files with 14 additions and 12 deletions

View File

@@ -73,7 +73,7 @@ function(do_test target arg result)
set_tests_properties(Comp${arg}
PROPERTIES PASS_REGULAR_EXPRESSION ${result}
)
endfunction(do_test)
endfunction()
# do a bunch of result based tests
do_test(Tutorial 4 "4 is 2")

View File

@@ -88,6 +88,8 @@ input, and expected results based on the passed arguments.
Rebuild the application and then cd to the binary directory and run the
:manual:`ctest <ctest(1)>` executable: ``ctest -N`` and ``ctest -VV``. For
multi-config generators (e.g. Visual Studio), the configuration type must be
specified. To run tests in Debug mode, for example, use ``ctest -C Debug -VV``
from the build directory (not the Debug subdirectory!). Alternatively, build
the ``RUN_TESTS`` target from the IDE.
specified with the ``-C <mode>`` flag. For example, to run tests in Debug
mode use ``ctest -C Debug -VV`` from the binary directory
(not the Debug subdirectory!). Release mode would be executed from the same
location but with a ``-C Release``. Alternatively, build the ``RUN_TESTS``
target from the IDE.

View File

@@ -55,7 +55,7 @@ function(do_test target arg result)
set_tests_properties(Comp${arg}
PROPERTIES PASS_REGULAR_EXPRESSION ${result}
)
endfunction(do_test)
endfunction()
# do a bunch of result based tests
do_test(Tutorial 4 "4 is 2")

View File

@@ -63,7 +63,7 @@ function(do_test target arg result)
set_tests_properties(Comp${arg}
PROPERTIES PASS_REGULAR_EXPRESSION ${result}
)
endfunction(do_test)
endfunction()
# do a bunch of result based tests
do_test(Tutorial 4 "4 is 2")

View File

@@ -69,7 +69,7 @@ function(do_test target arg result)
set_tests_properties(Comp${arg}
PROPERTIES PASS_REGULAR_EXPRESSION ${result}
)
endfunction(do_test)
endfunction()
# do a bunch of result based tests
do_test(Tutorial 4 "4 is 2")

View File

@@ -54,7 +54,7 @@ function(do_test target arg result)
set_tests_properties(Comp${arg}
PROPERTIES PASS_REGULAR_EXPRESSION ${result}
)
endfunction(do_test)
endfunction()
# do a bunch of result based tests
do_test(Tutorial 4 "4 is 2")

View File

@@ -54,7 +54,7 @@ function(do_test target arg result)
set_tests_properties(Comp${arg}
PROPERTIES PASS_REGULAR_EXPRESSION ${result}
)
endfunction(do_test)
endfunction()
# do a bunch of result based tests
do_test(Tutorial 4 "4 is 2")

View File

@@ -54,7 +54,7 @@ function(do_test target arg result)
set_tests_properties(Comp${arg}
PROPERTIES PASS_REGULAR_EXPRESSION ${result}
)
endfunction(do_test)
endfunction()
# do a bunch of result based tests
do_test(Tutorial 4 "4 is 2")

View File

@@ -54,7 +54,7 @@ function(do_test target arg result)
set_tests_properties(Comp${arg}
PROPERTIES PASS_REGULAR_EXPRESSION ${result}
)
endfunction(do_test)
endfunction()
# do a bunch of result based tests
do_test(Tutorial 4 "4 is 2")

View File

@@ -54,7 +54,7 @@ function(do_test target arg result)
set_tests_properties(Comp${arg}
PROPERTIES PASS_REGULAR_EXPRESSION ${result}
)
endfunction(do_test)
endfunction()
# do a bunch of result based tests
do_test(Tutorial 4 "4 is 2")