summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeTests/VersionTest.cmake.in14
-rw-r--r--Tests/CTestTestStopTime/GetDate.cmake4
-rw-r--r--Tests/Complex/CMakeLists.txt6
-rw-r--r--Tests/Complex/Executable/complex.cxx200
-rw-r--r--Tests/Complex/VarTests.cmake78
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx194
-rw-r--r--Tests/ComplexOneConfig/VarTests.cmake78
7 files changed, 535 insertions, 39 deletions
diff --git a/Tests/CMakeTests/VersionTest.cmake.in b/Tests/CMakeTests/VersionTest.cmake.in
index 4e946ab..f045605 100644
--- a/Tests/CMakeTests/VersionTest.cmake.in
+++ b/Tests/CMakeTests/VersionTest.cmake.in
@@ -83,10 +83,24 @@ foreach(v IN LISTS LESSV)
message(FATAL_ERROR "${CMAKE_MATCH_2} is less than ${CMAKE_MATCH_1}?")
endif()
+ # check greater or equal (same as less negative)
+ if(CMAKE_MATCH_2 VERSION_GREATER_EQUAL CMAKE_MATCH_1)
+ message(STATUS "${CMAKE_MATCH_2} is not less than ${CMAKE_MATCH_1}")
+ else()
+ message(FATAL_ERROR "${CMAKE_MATCH_2} is less than ${CMAKE_MATCH_1}?")
+ endif()
+
# check greater negative case
if(NOT CMAKE_MATCH_1 VERSION_GREATER CMAKE_MATCH_2)
message(STATUS "${CMAKE_MATCH_1} is not greater than ${CMAKE_MATCH_2}")
else()
message(FATAL_ERROR "${CMAKE_MATCH_1} is greater than ${CMAKE_MATCH_2}?")
endif()
+
+ # check less or equal (same as greater negative) case
+ if(CMAKE_MATCH_1 VERSION_LESS_EQUAL CMAKE_MATCH_2)
+ message(STATUS "${CMAKE_MATCH_1} is not greater than ${CMAKE_MATCH_2}")
+ else()
+ message(FATAL_ERROR "${CMAKE_MATCH_1} is greater than ${CMAKE_MATCH_2}?")
+ endif()
endforeach()
diff --git a/Tests/CTestTestStopTime/GetDate.cmake b/Tests/CTestTestStopTime/GetDate.cmake
index edc6519..1f4cb24 100644
--- a/Tests/CTestTestStopTime/GetDate.cmake
+++ b/Tests/CTestTestStopTime/GetDate.cmake
@@ -106,11 +106,11 @@ macro(ADD_SECONDS sec)
set(new_min ${${GD_PREFIX}MINUTE})
set(new_hr ${${GD_PREFIX}HOUR})
math(EXPR new_sec "${sec} + ${${GD_PREFIX}SECOND}")
- while(${new_sec} GREATER 60 OR ${new_sec} EQUAL 60)
+ while(${new_sec} GREATER_EQUAL 60)
math(EXPR new_sec "${new_sec} - 60")
math(EXPR new_min "${${GD_PREFIX}MINUTE} + 1")
endwhile()
- while(${new_min} GREATER 60 OR ${new_min} EQUAL 60)
+ while(${new_min} GREATER_EQUAL 60)
math(EXPR new_min "${new_min} - 60")
math(EXPR new_hr "${${GD_PREFIX}HOUR} + 1")
endwhile()
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 80cc2e3..075faa7 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -92,6 +92,12 @@ endif()
if(NOT 2.4 EQUAL 2.4)
message(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4")
endif()
+if(NOT 2.4 LESS_EQUAL 2.4)
+ message(FATAL_ERROR "Failed: NOT 2.4 LESS_EQUAL 2.4")
+endif()
+if(NOT 2.4 GREATER_EQUAL 2.4)
+ message(FATAL_ERROR "Failed: NOT 2.4 GREATER_EQUAL 2.4")
+endif()
if(CMAKE_SYSTEM MATCHES "OSF1-V")
if(NOT CMAKE_COMPILER_IS_GNUCXX)
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 5f79ac0..3b09229 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -455,7 +455,7 @@ int main()
#endif
#ifndef SHOULD_BE_DEFINED_LESS
- cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS is not defined.\n");
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS is not defined.");
#else
cmPassed("SHOULD_BE_DEFINED_LESS is defined.");
#endif
@@ -467,7 +467,7 @@ int main()
#endif
#ifndef SHOULD_BE_DEFINED_LESS2
- cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS2 is not defined.\n");
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS2 is not defined.");
#else
cmPassed("SHOULD_BE_DEFINED_LESS2 is defined.");
#endif
@@ -478,6 +478,24 @@ int main()
cmPassed("SHOULD_NOT_BE_DEFINED_GREATER is not defined.");
#endif
+#ifndef SHOULD_BE_DEFINED_GREATER
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_GREATER is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_GREATER2
+ cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER2 is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_GREATER2 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_GREATER2
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER2 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_GREATER2 is defined.");
+#endif
+
#ifdef SHOULD_NOT_BE_DEFINED_EQUAL
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EQUAL is defined.");
#else
@@ -485,28 +503,93 @@ int main()
#endif
#ifndef SHOULD_BE_DEFINED_EQUAL
- cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_EQUAL is not defined.\n");
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_EQUAL is not defined.");
#else
cmPassed("SHOULD_BE_DEFINED_EQUAL is defined.");
#endif
-#ifndef SHOULD_BE_DEFINED_GREATER
- cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER is not defined.\n");
+#ifdef SHOULD_NOT_BE_DEFINED_LESS_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS_EQUAL is defined.");
#else
- cmPassed("SHOULD_BE_DEFINED_GREATER is defined.");
+ cmPassed("SHOULD_NOT_BE_DEFINED_LESS_EQUAL is not defined.");
#endif
-#ifdef SHOULD_NOT_BE_DEFINED_GREATER2
- cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER2 is defined.");
+#ifndef SHOULD_BE_DEFINED_LESS_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_LESS_EQUAL is not defined.");
#else
- cmPassed("SHOULD_NOT_BE_DEFINED_GREATER2 is not defined.");
+ cmPassed("SHOULD_BE_DEFINED_LESS_EQUAL is defined.");
#endif
-#ifndef SHOULD_BE_DEFINED_GREATER2
+#ifdef SHOULD_NOT_BE_DEFINED_LESS_EQUAL2
cmFailed(
- "IF or SET is broken, SHOULD_BE_DEFINED_GREATER2 is not defined.\n");
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS_EQUAL2 is defined.");
#else
- cmPassed("SHOULD_BE_DEFINED_GREATER2 is defined.");
+ cmPassed("SHOULD_NOT_BE_DEFINED_LESS_EQUAL2 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_LESS_EQUAL2
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_LESS_EQUAL2 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_LESS_EQUAL2 is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_LESS_EQUAL3
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS_EQUAL3 is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_LESS_EQUAL3 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_LESS_EQUAL3
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_LESS_EQUAL3 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_LESS_EQUAL3 is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_GREATER_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER_EQUAL is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_GREATER_EQUAL is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_GREATER_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_GREATER_EQUAL is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_GREATER_EQUAL is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_GREATER_EQUAL2
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER_EQUAL2 is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_GREATER_EQUAL2 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_GREATER_EQUAL2
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_GREATER_EQUAL2 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_GREATER_EQUAL2 is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_GREATER_EQUAL3
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER_EQUAL3 is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_GREATER_EQUAL3 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_GREATER_EQUAL3
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_GREATER_EQUAL3 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_GREATER_EQUAL3 is defined.");
#endif
#ifdef SHOULD_NOT_BE_DEFINED_STRLESS
@@ -516,7 +599,7 @@ int main()
#endif
#ifndef SHOULD_BE_DEFINED_STRLESS
- cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS is not defined.\n");
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS is not defined.");
#else
cmPassed("SHOULD_BE_DEFINED_STRLESS is defined.");
#endif
@@ -528,8 +611,7 @@ int main()
#endif
#ifndef SHOULD_BE_DEFINED_STRLESS2
- cmFailed(
- "IF or SET is broken, SHOULD_BE_DEFINED_STRLESS2 is not defined.\n");
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS2 is not defined.");
#else
cmPassed("SHOULD_BE_DEFINED_STRLESS2 is defined.");
#endif
@@ -543,7 +625,7 @@ int main()
#ifndef SHOULD_BE_DEFINED_STRGREATER
cmFailed(
- "IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER is not defined.\n");
+ "IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER is not defined.");
#else
cmPassed("SHOULD_BE_DEFINED_STRGREATER is defined.");
#endif
@@ -557,11 +639,95 @@ int main()
#ifndef SHOULD_BE_DEFINED_STRGREATER2
cmFailed(
- "IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER2 is not defined.\n");
+ "IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER2 is not defined.");
#else
cmPassed("SHOULD_BE_DEFINED_STRGREATER2 is defined.");
#endif
+#ifdef SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_STRLESS_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_STRLESS_EQUAL is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_STRLESS_EQUAL is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL2
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL2 is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL2 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_STRLESS_EQUAL2
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_STRLESS_EQUAL2 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_STRLESS_EQUAL2 is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL3
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL3 is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL3 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_STRLESS_EQUAL3
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_STRLESS_EQUAL3 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_STRLESS_EQUAL3 is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_STRGREATER_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER_EQUAL is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_STRGREATER_EQUAL is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL2
+ cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL2 is "
+ "defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL2 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_STRGREATER_EQUAL2
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER_EQUAL2 is not "
+ "defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_STRGREATER_EQUAL2 is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL3
+ cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL3 is "
+ "defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL3 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_STRGREATER_EQUAL3
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER_EQUAL3 is not "
+ "defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_STRGREATER_EQUAL3 is defined.");
+#endif
+
// ----------------------------------------------------------------------
// Test FOREACH
diff --git a/Tests/Complex/VarTests.cmake b/Tests/Complex/VarTests.cmake
index 9d35949..8be59be 100644
--- a/Tests/Complex/VarTests.cmake
+++ b/Tests/Complex/VarTests.cmake
@@ -126,6 +126,12 @@ else ()
add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER)
endif ()
+if (SNUM1_VAR GREATER SNUM2_VAR)
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER2)
+else ()
+ add_definitions(-DSHOULD_BE_DEFINED_GREATER2)
+endif ()
+
if (SNUM2_VAR EQUAL SNUM1_VAR)
add_definitions(-DSHOULD_NOT_BE_DEFINED_EQUAL)
else ()
@@ -138,10 +144,40 @@ else ()
add_definitions(-DSHOULD_NOT_BE_DEFINED_EQUAL)
endif ()
-if (SNUM1_VAR GREATER SNUM2_VAR)
- add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER2)
+if (SNUM1_VAR LESS_EQUAL SNUM2_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_LESS_EQUAL)
else ()
- add_definitions(-DSHOULD_BE_DEFINED_GREATER2)
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_LESS_EQUAL)
+endif ()
+
+if (SNUM2_VAR LESS_EQUAL SNUM1_VAR)
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_LESS_EQUAL2)
+else ()
+ add_definitions(-DSHOULD_BE_DEFINED_LESS_EQUAL2)
+endif ()
+
+if (SNUM1_VAR LESS_EQUAL SNUM3_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_LESS_EQUAL3)
+else ()
+ add_definitions(-DSHOULD_BE_DEFINED_LESS_EQUAL3)
+endif ()
+
+if (SNUM2_VAR GREATER_EQUAL SNUM1_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_GREATER_EQUAL)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER_EQUAL)
+endif ()
+
+if (SNUM1_VAR GREATER_EQUAL SNUM2_VAR)
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER_EQUAL2)
+else ()
+ add_definitions(-DSHOULD_BE_DEFINED_GREATER_EQUAL2)
+endif ()
+
+if (SNUM1_VAR GREATER_EQUAL SNUM3_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_GREATER_EQUAL3)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER_EQUAL3)
endif ()
set (SSTR1_VAR "abc")
@@ -171,6 +207,42 @@ else ()
add_definitions(-DSHOULD_BE_DEFINED_STRGREATER2)
endif ()
+if (SSTR1_VAR STRLESS_EQUAL SSTR2_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_STRLESS_EQUAL)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_STRLESS_EQUAL)
+endif ()
+
+if (SSTR2_VAR STRLESS_EQUAL SSTR1_VAR)
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_STRLESS_EQUAL2)
+else ()
+ add_definitions(-DSHOULD_BE_DEFINED_STRLESS_EQUAL2)
+endif ()
+
+if (SSTR1_VAR STRLESS_EQUAL SSTR1_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_STRLESS_EQUAL3)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_STRLESS_EQUAL3)
+endif ()
+
+if (SSTR2_VAR STRGREATER_EQUAL SSTR1_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_STRGREATER_EQUAL)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL)
+endif ()
+
+if (SSTR1_VAR STRGREATER_EQUAL SSTR2_VAR)
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL2)
+else ()
+ add_definitions(-DSHOULD_BE_DEFINED_STRGREATER_EQUAL2)
+endif ()
+
+if (SSTR1_VAR STRGREATER_EQUAL SSTR1_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_STRGREATER_EQUAL3)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL3)
+endif ()
+
#
# Test FOREACH
#
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 5f79ac0..9e4eaad 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -478,6 +478,24 @@ int main()
cmPassed("SHOULD_NOT_BE_DEFINED_GREATER is not defined.");
#endif
+#ifndef SHOULD_BE_DEFINED_GREATER
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER is not defined.\n");
+#else
+ cmPassed("SHOULD_BE_DEFINED_GREATER is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_GREATER2
+ cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER2 is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_GREATER2 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_GREATER2
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER2 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_GREATER2 is defined.");
+#endif
+
#ifdef SHOULD_NOT_BE_DEFINED_EQUAL
cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EQUAL is defined.");
#else
@@ -490,23 +508,88 @@ int main()
cmPassed("SHOULD_BE_DEFINED_EQUAL is defined.");
#endif
-#ifndef SHOULD_BE_DEFINED_GREATER
- cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER is not defined.\n");
+#ifdef SHOULD_NOT_BE_DEFINED_LESS_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS_EQUAL is defined.");
#else
- cmPassed("SHOULD_BE_DEFINED_GREATER is defined.");
+ cmPassed("SHOULD_NOT_BE_DEFINED_LESS_EQUAL is not defined.");
#endif
-#ifdef SHOULD_NOT_BE_DEFINED_GREATER2
- cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER2 is defined.");
+#ifndef SHOULD_BE_DEFINED_LESS_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_LESS_EQUAL is not defined.");
#else
- cmPassed("SHOULD_NOT_BE_DEFINED_GREATER2 is not defined.");
+ cmPassed("SHOULD_BE_DEFINED_LESS_EQUAL is defined.");
#endif
-#ifndef SHOULD_BE_DEFINED_GREATER2
+#ifdef SHOULD_NOT_BE_DEFINED_LESS_EQUAL2
cmFailed(
- "IF or SET is broken, SHOULD_BE_DEFINED_GREATER2 is not defined.\n");
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS_EQUAL2 is defined.");
#else
- cmPassed("SHOULD_BE_DEFINED_GREATER2 is defined.");
+ cmPassed("SHOULD_NOT_BE_DEFINED_LESS_EQUAL2 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_LESS_EQUAL2
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_LESS_EQUAL2 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_LESS_EQUAL2 is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_LESS_EQUAL3
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS_EQUAL3 is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_LESS_EQUAL3 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_LESS_EQUAL3
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_LESS_EQUAL3 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_LESS_EQUAL3 is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_GREATER_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER_EQUAL is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_GREATER_EQUAL is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_GREATER_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_GREATER_EQUAL is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_GREATER_EQUAL is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_GREATER_EQUAL2
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER_EQUAL2 is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_GREATER_EQUAL2 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_GREATER_EQUAL2
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_GREATER_EQUAL2 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_GREATER_EQUAL2 is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_GREATER_EQUAL3
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER_EQUAL3 is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_GREATER_EQUAL3 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_GREATER_EQUAL3
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_GREATER_EQUAL3 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_GREATER_EQUAL3 is defined.");
#endif
#ifdef SHOULD_NOT_BE_DEFINED_STRLESS
@@ -516,7 +599,7 @@ int main()
#endif
#ifndef SHOULD_BE_DEFINED_STRLESS
- cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS is not defined.\n");
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS is not defined.");
#else
cmPassed("SHOULD_BE_DEFINED_STRLESS is defined.");
#endif
@@ -528,8 +611,7 @@ int main()
#endif
#ifndef SHOULD_BE_DEFINED_STRLESS2
- cmFailed(
- "IF or SET is broken, SHOULD_BE_DEFINED_STRLESS2 is not defined.\n");
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS2 is not defined.");
#else
cmPassed("SHOULD_BE_DEFINED_STRLESS2 is defined.");
#endif
@@ -543,7 +625,7 @@ int main()
#ifndef SHOULD_BE_DEFINED_STRGREATER
cmFailed(
- "IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER is not defined.\n");
+ "IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER is not defined.");
#else
cmPassed("SHOULD_BE_DEFINED_STRGREATER is defined.");
#endif
@@ -557,11 +639,95 @@ int main()
#ifndef SHOULD_BE_DEFINED_STRGREATER2
cmFailed(
- "IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER2 is not defined.\n");
+ "IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER2 is not defined.");
#else
cmPassed("SHOULD_BE_DEFINED_STRGREATER2 is defined.");
#endif
+#ifdef SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_STRLESS_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_STRLESS_EQUAL is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_STRLESS_EQUAL is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL2
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL2 is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL2 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_STRLESS_EQUAL2
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_STRLESS_EQUAL2 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_STRLESS_EQUAL2 is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL3
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL3 is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS_EQUAL3 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_STRLESS_EQUAL3
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_STRLESS_EQUAL3 is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_STRLESS_EQUAL3 is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_STRGREATER_EQUAL
+ cmFailed(
+ "IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER_EQUAL is not defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_STRGREATER_EQUAL is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL2
+ cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL2 is "
+ "defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL2 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_STRGREATER_EQUAL2
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER_EQUAL2 is not "
+ "defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_STRGREATER_EQUAL2 is defined.");
+#endif
+
+#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL3
+ cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL3 is "
+ "defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL3 is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_STRGREATER_EQUAL3
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER_EQUAL3 is not "
+ "defined.");
+#else
+ cmPassed("SHOULD_BE_DEFINED_STRGREATER_EQUAL3 is defined.");
+#endif
+
// ----------------------------------------------------------------------
// Test FOREACH
diff --git a/Tests/ComplexOneConfig/VarTests.cmake b/Tests/ComplexOneConfig/VarTests.cmake
index 9d35949..7dd8519 100644
--- a/Tests/ComplexOneConfig/VarTests.cmake
+++ b/Tests/ComplexOneConfig/VarTests.cmake
@@ -126,6 +126,12 @@ else ()
add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER)
endif ()
+if (SNUM1_VAR GREATER SNUM2_VAR)
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER2)
+else ()
+ add_definitions(-DSHOULD_BE_DEFINED_GREATER2)
+endif ()
+
if (SNUM2_VAR EQUAL SNUM1_VAR)
add_definitions(-DSHOULD_NOT_BE_DEFINED_EQUAL)
else ()
@@ -138,10 +144,40 @@ else ()
add_definitions(-DSHOULD_NOT_BE_DEFINED_EQUAL)
endif ()
-if (SNUM1_VAR GREATER SNUM2_VAR)
- add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER2)
+if (SNUM1_VAR LESS_EQUAL SNUM2_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_LESS_EQUAL)
else ()
- add_definitions(-DSHOULD_BE_DEFINED_GREATER2)
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_LESS_EQUAL)
+endif ()
+
+if (SNUM2_VAR LESS_EQUAL SNUM1_VAR)
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_LESS_EQUAL2)
+else ()
+ add_definitions(-DSHOULD_BE_DEFINED_LESS_EQUAL2)
+endif ()
+
+if (SNUM1_VAR LESS_EQUAL SNUM3_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_LESS_EQUAL3)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_LESS_EQUAL3)
+endif ()
+
+if (SNUM2_VAR GREATER_EQUAL SNUM1_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_GREATER_EQUAL)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER_EQUAL)
+endif ()
+
+if (SNUM1_VAR GREATER_EQUAL SNUM2_VAR)
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER_EQUAL2)
+else ()
+ add_definitions(-DSHOULD_BE_DEFINED_GREATER_EQUAL2)
+endif ()
+
+if (SNUM1_VAR GREATER_EQUAL SNUM3_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_GREATER_EQUAL3)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_GREATER_EQUAL3)
endif ()
set (SSTR1_VAR "abc")
@@ -171,6 +207,42 @@ else ()
add_definitions(-DSHOULD_BE_DEFINED_STRGREATER2)
endif ()
+if (SSTR1_VAR STRLESS_EQUAL SSTR2_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_STRLESS_EQUAL)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_STRLESS_EQUAL)
+endif ()
+
+if (SSTR2_VAR STRLESS_EQUAL SSTR1_VAR)
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_STRLESS_EQUAL2)
+else ()
+ add_definitions(-DSHOULD_BE_DEFINED_STRLESS_EQUAL2)
+endif ()
+
+if (SSTR1_VAR STRLESS_EQUAL SSTR1_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_STRLESS_EQUAL3)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_STRLESS_EQUAL3)
+endif ()
+
+if (SSTR2_VAR STRGREATER_EQUAL SSTR1_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_STRGREATER_EQUAL)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL)
+endif ()
+
+if (SSTR1_VAR STRGREATER_EQUAL SSTR2_VAR)
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL2)
+else ()
+ add_definitions(-DSHOULD_BE_DEFINED_STRGREATER_EQUAL2)
+endif ()
+
+if (SSTR1_VAR STRGREATER_EQUAL SSTR1_VAR)
+ add_definitions(-DSHOULD_BE_DEFINED_STRGREATER_EQUAL3)
+else ()
+ add_definitions(-DSHOULD_NOT_BE_DEFINED_STRGREATER_EQUAL3)
+endif ()
+
#
# Test FOREACH
#