
Rules/ common build rules for all platformsīin/ all executables (dynamic link libraries on Windows) This directory layout is shown below.īuild/ the build system for Unix and additional utility scriptsĬonfig/ build configurations for various Unix platforms All libraries and tools follow a common convention for the directory layout. Both archives contain the same files, the only difference is that all text files in the ZIP files have line endings suitable for Windows (CR-LF), while the text files in the TAR file have line endings suitable for Unix/Linux (LF only). Location but with a -C Release.The source code for the POCO C++ Libraries is delivered in a ZIP file for Windows users and/or in a compressed TAR file (.tar.gz or. Release mode would be executed from the same Mode use ctest -C Debug -VV from the binary directory Visual Studio), the configuration type must be Rebuild the application and then cd to the binary directory and run theĬtest executable: ctest -N and ctest -VV. Input, and expected results based on the passed arguments. Invocation of do_test, another test is added to the project with a name, Verifies that the computed square root is correct for given input. Lastly, we have a function called do_test that runs the application and This case, verifying that the usage message is printed when an incorrect number Property to verify that the output of the test contains certain strings.

The next test makes use of the PASS_REGULAR_EXPRESSION test Otherwise crash, and has a zero return value. The first test simply verifies that the application runs, does not segfault or Enable_testing() # does the application run add_test( NAME Runs COMMAND Tutorial 25 ) # does the usage message work? add_test( NAME Usage COMMAND Tutorial ) set_tests_properties( Usage PROPERTIES PASS_REGULAR_EXPRESSION "Usage.*number" ) # define a function to simplify adding tests function( do_test target arg result ) add_test( NAME Comp $ ) endfunction() # do a bunch of result based tests do_test( Tutorial 4 "4 is 2" ) do_test( Tutorial 9 "9 is 3" ) do_test( Tutorial 5 "5 is 2.236" ) do_test( Tutorial 7 "7 is 2.645" ) do_test( Tutorial 25 "25 is 5" ) do_test( Tutorial - 25 "-25 is (-nan|nan|0)" ) do_test( Tutorial 0.0001 "0.0001 is 0.01" )
