summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/math/MATH.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/math/MATH.cmake')
-rw-r--r--Tests/RunCMake/math/MATH.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/math/MATH.cmake b/Tests/RunCMake/math/MATH.cmake
new file mode 100644
index 0000000..4ec7f9c
--- /dev/null
+++ b/Tests/RunCMake/math/MATH.cmake
@@ -0,0 +1,9 @@
+macro(math_test expression expected)
+ math(EXPR evaluated ${expression} ${ARGN})
+ if (NOT evaluated STREQUAL ${expected})
+ message(FATAL_ERROR "wrong math result: ${evaluated} != ${expected}")
+ endif ()
+endmacro()
+
+
+math_test("100 * 10" 1000)