diff options
Diffstat (limited to 'Tests/ComplexRelativePaths/Executable')
-rw-r--r-- | Tests/ComplexRelativePaths/Executable/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/Executable/complex.cxx | 72 |
2 files changed, 77 insertions, 1 deletions
diff --git a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt index 33332eb..438808f 100644 --- a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/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/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx index a611b72..8707937 100644 --- a/Tests/ComplexRelativePaths/Executable/complex.cxx +++ b/Tests/ComplexRelativePaths/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 |