summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-04-28 14:09:50 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-04-28 14:09:50 (GMT)
commit14ba8b5df9728abd26fc6ce008b4e4a1ad3ceb96 (patch)
tree7406a24054a7efcdd9b99296ca92124ea7d3dc0f /Tests
parent996ac24181b8de07dce0eb5c1e200ffed9a44862 (diff)
downloadCMake-14ba8b5df9728abd26fc6ce008b4e4a1ad3ceb96.zip
CMake-14ba8b5df9728abd26fc6ce008b4e4a1ad3ceb96.tar.gz
CMake-14ba8b5df9728abd26fc6ce008b4e4a1ad3ceb96.tar.bz2
ENH: add a test for EQUAL in if
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Complex/Executable/complex.cxx12
-rw-r--r--Tests/Complex/VarTests.cmake14
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx12
-rw-r--r--Tests/ComplexOneConfig/VarTests.cmake14
-rw-r--r--Tests/ComplexRelativePaths/Executable/complex.cxx12
-rw-r--r--Tests/ComplexRelativePaths/VarTests.cmake14
6 files changed, 78 insertions, 0 deletions
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 5cbe51c..2d4bd51 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -425,6 +425,18 @@ int main()
cmPassed("SHOULD_NOT_BE_DEFINED_GREATER is not defined.");
#endif
+#ifdef SHOULD_NOT_BE_DEFINED_EQUAL
+ cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EQUAL is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_EQUAL is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_EQUAL
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_EQUAL is not defined.\n");
+#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");
#else
diff --git a/Tests/Complex/VarTests.cmake b/Tests/Complex/VarTests.cmake
index d9804a2..477fab9 100644
--- a/Tests/Complex/VarTests.cmake
+++ b/Tests/Complex/VarTests.cmake
@@ -97,6 +97,8 @@ ENDIF (EXISTS ${Complex_SOURCE_DIR}/roquefort.txt)
SET (SNUM1_VAR "1")
SET (SNUM2_VAR "2")
+SET (SNUM3_VAR "1")
+
IF (SNUM1_VAR LESS SNUM2_VAR)
ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_LESS)
@@ -116,6 +118,18 @@ ELSE (SNUM2_VAR GREATER SNUM1_VAR)
ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_GREATER)
ENDIF (SNUM2_VAR GREATER SNUM1_VAR)
+IF (SNUM2_VAR EQUAL SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_EQUAL)
+ELSE (SNUM2_VAR EQUAL SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_EQUAL)
+ENDIF (SNUM2_VAR EQUAL SNUM1_VAR)
+
+IF (SNUM3_VAR EQUAL SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_EQUAL)
+ELSE (SNUM3_VAR EQUAL SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_EQUAL)
+ENDIF (SNUM3_VAR EQUAL SNUM1_VAR)
+
IF (SNUM1_VAR GREATER SNUM2_VAR)
ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_GREATER2)
ELSE (SNUM1_VAR GREATER SNUM2_VAR)
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 5cbe51c..2d4bd51 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -425,6 +425,18 @@ int main()
cmPassed("SHOULD_NOT_BE_DEFINED_GREATER is not defined.");
#endif
+#ifdef SHOULD_NOT_BE_DEFINED_EQUAL
+ cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EQUAL is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_EQUAL is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_EQUAL
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_EQUAL is not defined.\n");
+#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");
#else
diff --git a/Tests/ComplexOneConfig/VarTests.cmake b/Tests/ComplexOneConfig/VarTests.cmake
index d9804a2..477fab9 100644
--- a/Tests/ComplexOneConfig/VarTests.cmake
+++ b/Tests/ComplexOneConfig/VarTests.cmake
@@ -97,6 +97,8 @@ ENDIF (EXISTS ${Complex_SOURCE_DIR}/roquefort.txt)
SET (SNUM1_VAR "1")
SET (SNUM2_VAR "2")
+SET (SNUM3_VAR "1")
+
IF (SNUM1_VAR LESS SNUM2_VAR)
ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_LESS)
@@ -116,6 +118,18 @@ ELSE (SNUM2_VAR GREATER SNUM1_VAR)
ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_GREATER)
ENDIF (SNUM2_VAR GREATER SNUM1_VAR)
+IF (SNUM2_VAR EQUAL SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_EQUAL)
+ELSE (SNUM2_VAR EQUAL SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_EQUAL)
+ENDIF (SNUM2_VAR EQUAL SNUM1_VAR)
+
+IF (SNUM3_VAR EQUAL SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_EQUAL)
+ELSE (SNUM3_VAR EQUAL SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_EQUAL)
+ENDIF (SNUM3_VAR EQUAL SNUM1_VAR)
+
IF (SNUM1_VAR GREATER SNUM2_VAR)
ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_GREATER2)
ELSE (SNUM1_VAR GREATER SNUM2_VAR)
diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx
index 5cbe51c..2d4bd51 100644
--- a/Tests/ComplexRelativePaths/Executable/complex.cxx
+++ b/Tests/ComplexRelativePaths/Executable/complex.cxx
@@ -425,6 +425,18 @@ int main()
cmPassed("SHOULD_NOT_BE_DEFINED_GREATER is not defined.");
#endif
+#ifdef SHOULD_NOT_BE_DEFINED_EQUAL
+ cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_EQUAL is defined.");
+#else
+ cmPassed("SHOULD_NOT_BE_DEFINED_EQUAL is not defined.");
+#endif
+
+#ifndef SHOULD_BE_DEFINED_EQUAL
+ cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_EQUAL is not defined.\n");
+#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");
#else
diff --git a/Tests/ComplexRelativePaths/VarTests.cmake b/Tests/ComplexRelativePaths/VarTests.cmake
index d9804a2..477fab9 100644
--- a/Tests/ComplexRelativePaths/VarTests.cmake
+++ b/Tests/ComplexRelativePaths/VarTests.cmake
@@ -97,6 +97,8 @@ ENDIF (EXISTS ${Complex_SOURCE_DIR}/roquefort.txt)
SET (SNUM1_VAR "1")
SET (SNUM2_VAR "2")
+SET (SNUM3_VAR "1")
+
IF (SNUM1_VAR LESS SNUM2_VAR)
ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_LESS)
@@ -116,6 +118,18 @@ ELSE (SNUM2_VAR GREATER SNUM1_VAR)
ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_GREATER)
ENDIF (SNUM2_VAR GREATER SNUM1_VAR)
+IF (SNUM2_VAR EQUAL SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_EQUAL)
+ELSE (SNUM2_VAR EQUAL SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_EQUAL)
+ENDIF (SNUM2_VAR EQUAL SNUM1_VAR)
+
+IF (SNUM3_VAR EQUAL SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_EQUAL)
+ELSE (SNUM3_VAR EQUAL SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_EQUAL)
+ENDIF (SNUM3_VAR EQUAL SNUM1_VAR)
+
IF (SNUM1_VAR GREATER SNUM2_VAR)
ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_GREATER2)
ELSE (SNUM1_VAR GREATER SNUM2_VAR)