diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2002-01-20 06:58:57 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2002-01-20 06:58:57 (GMT) |
commit | 6f3570656caf463addeb9edafcecba33f0efcbb9 (patch) | |
tree | d7c00a97f0216851a1adc583ec0ed737b3e99e8e /Tests/Complex/Executable | |
parent | f04128ad63b560079ab49118b9e64e2fe73ba39b (diff) | |
download | CMake-6f3570656caf463addeb9edafcecba33f0efcbb9.zip CMake-6f3570656caf463addeb9edafcecba33f0efcbb9.tar.gz CMake-6f3570656caf463addeb9edafcecba33f0efcbb9.tar.bz2 |
Increase Coverage.
Diffstat (limited to 'Tests/Complex/Executable')
-rw-r--r-- | Tests/Complex/Executable/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/Complex/Executable/complex.cxx | 72 |
2 files changed, 77 insertions, 1 deletions
diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt index 33332eb..438808f 100644 --- a/Tests/Complex/Executable/CMakeLists.txt +++ b/Tests/Complex/Executable/CMakeLists.txt @@ -17,7 +17,11 @@ FIND_LIBRARY(CMAKE_LIB ${Complex_BINARY_DIR}/../../Source/MinSizeRel ${Complex_BINARY_DIR}/../../Source/RelWithDebInfo) -TARGET_LINK_LIBRARIES(complex ${CMAKE_LIB}) +# Specify the same one for debug/optimized to increase coverage +TARGET_LINK_LIBRARIES(complex + ${CMAKE_LIB} + debug ${CMAKE_LIB} + optimized ${CMAKE_LIB}) # # Output the files required by 'complex' to a file. diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx index a611b72..8707937 100644 --- a/Tests/Complex/Executable/complex.cxx +++ b/Tests/Complex/Executable/complex.cxx @@ -157,6 +157,30 @@ int main() // ---------------------------------------------------------------------- // Test various IF/ELSE combinations +#ifdef SHOULD_NOT_BE_DEFINED_NOT + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_NOT is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_NOT is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_NOT + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_NOT is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_NOT is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_NOT2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_NOT2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_NOT2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_NOT2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_NOT2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_NOT2 is defined."); +#endif + #ifdef SHOULD_NOT_BE_DEFINED_AND cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_AND is defined."); #else @@ -169,6 +193,18 @@ int main() cmPassed("SHOULD_BE_DEFINED_AND is defined."); #endif +#ifdef SHOULD_NOT_BE_DEFINED_AND2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_AND2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_AND2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_AND2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_AND2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_AND2 is defined."); +#endif + #ifdef SHOULD_NOT_BE_DEFINED_OR cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_OR is defined."); #else @@ -181,6 +217,18 @@ int main() cmPassed("SHOULD_BE_DEFINED_OR is defined."); #endif +#ifdef SHOULD_NOT_BE_DEFINED_OR2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_OR2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_OR2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_OR2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_OR2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_OR2 is defined."); +#endif + #ifdef SHOULD_NOT_BE_DEFINED_MATCHES cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_MATCHES is defined."); #else @@ -193,6 +241,18 @@ int main() cmPassed("SHOULD_BE_DEFINED_MATCHES is defined."); #endif +#ifdef SHOULD_NOT_BE_DEFINED_MATCHES2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_MATCHES2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_MATCHES2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_MATCHES2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_MATCHES2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_MATCHES2 is defined."); +#endif + #ifdef SHOULD_NOT_BE_DEFINED_COMMAND cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_COMMAND is defined."); #else @@ -205,6 +265,18 @@ int main() cmPassed("SHOULD_BE_DEFINED_COMMAND is defined."); #endif +#ifdef SHOULD_NOT_BE_DEFINED_COMMAND2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_COMMAND2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_COMMAND2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_COMMAND2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_COMMAND2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_COMMAND2 is defined."); +#endif + // ---------------------------------------------------------------------- // Test FOREACH |