summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests/MathTestScript.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-10-09 20:11:47 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-10-09 20:11:47 (GMT)
commitebd0c2d3771835a1317c1fd70eafd3ebf2135b01 (patch)
tree1dc8f5805b5f3f01933bc0035b3b6cad7b04b73a /Tests/CMakeTests/MathTestScript.cmake
parentf9687e328f7ea64ea6384aae11af36fdd3a12643 (diff)
downloadCMake-ebd0c2d3771835a1317c1fd70eafd3ebf2135b01.zip
CMake-ebd0c2d3771835a1317c1fd70eafd3ebf2135b01.tar.gz
CMake-ebd0c2d3771835a1317c1fd70eafd3ebf2135b01.tar.bz2
Merge in changes for RC 3
Diffstat (limited to 'Tests/CMakeTests/MathTestScript.cmake')
-rw-r--r--Tests/CMakeTests/MathTestScript.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/CMakeTests/MathTestScript.cmake b/Tests/CMakeTests/MathTestScript.cmake
new file mode 100644
index 0000000..1b7f8a6
--- /dev/null
+++ b/Tests/CMakeTests/MathTestScript.cmake
@@ -0,0 +1,18 @@
+message(STATUS "testname='${testname}'")
+
+if(testname STREQUAL empty) # fail
+ math()
+
+elseif(testname STREQUAL bogus) # fail
+ math(BOGUS)
+
+elseif(testname STREQUAL not_enough_args) # fail
+ math(EXPR x)
+
+elseif(testname STREQUAL cannot_parse) # fail
+ math(EXPR x "1 + 2 +")
+
+else() # fail
+ message(FATAL_ERROR "testname='${testname}' - error: no such test in '${CMAKE_CURRENT_LIST_FILE}'")
+
+endif()