summaryrefslogtreecommitdiffstats
path: root/config/cmake/userblockTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake/userblockTest.cmake')
-rw-r--r--config/cmake/userblockTest.cmake32
1 files changed, 16 insertions, 16 deletions
diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake
index 0775cbe..43db733 100644
--- a/config/cmake/userblockTest.cmake
+++ b/config/cmake/userblockTest.cmake
@@ -4,28 +4,28 @@
# arguments checking
if (NOT TEST_PROGRAM)
message (FATAL_ERROR "Require TEST_PROGRAM tellub to be defined")
-endif (NOT TEST_PROGRAM)
+endif ()
if (NOT TEST_GET_PROGRAM)
message (FATAL_ERROR "Require TEST_GET_PROGRAM getub to be defined")
-endif (NOT TEST_GET_PROGRAM)
+endif ()
if (NOT TEST_FOLDER)
message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
+endif ()
if (NOT TEST_HFILE)
message (FATAL_ERROR "Require TEST_HFILE the hdf file to be defined")
-endif (NOT TEST_HFILE)
+endif ()
if (NOT TEST_UFILE)
message (FATAL_ERROR "Require TEST_UFILE the ub file to be defined")
-endif (NOT TEST_UFILE)
+endif ()
if (NOT TEST_CHECKUB)
message (STATUS "Require TEST_CHECKUB - YES or NO - to be defined")
-endif (NOT TEST_CHECKUB)
+endif ()
#if (NOT TEST_EXPECT)
# message (STATUS "Require TEST_EXPECT to be defined")
-#endif (NOT TEST_EXPECT)
+#endif ()
#if (NOT TEST_OFILE)
# message (FATAL_ERROR "Require TEST_OFILE the original hdf file to be defined")
-#endif (NOT TEST_OFILE)
+#endif ()
set (TEST_U_STRING_LEN 0)
set (TEST_O_STRING_LEN 0)
@@ -53,9 +53,9 @@ if (TEST_CHECKUB STREQUAL "YES")
)
if (NOT ${TEST_RESULT} STREQUAL "0")
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} ${TEST_OFILE} is: ${TEST_ERROR}")
- endif (NOT ${TEST_RESULT} STREQUAL "0")
+ endif ()
file (READ ${TEST_HFILE}.len.txt TEST_O_STRING_LEN)
- endif (TEST_OFILE)
+ endif ()
MATH( EXPR TEST_STRING_SIZE "${TEST_U_STRING_LEN} + ${TEST_O_STRING_LEN}" )
@@ -73,10 +73,10 @@ if (TEST_CHECKUB STREQUAL "YES")
#cat $ufile >> $cmpfile
file (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME)
file (APPEND ${TEST_HFILE}-ub.cmp "${TEST_STREAM}")
- else (NOT TEST_O_STRING_LEN STREQUAL "0")
+ else ()
file (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME)
file (WRITE ${TEST_HFILE}-ub.cmp ${TEST_STREAM})
- endif (NOT TEST_O_STRING_LEN STREQUAL "0")
+ endif ()
#$JAM_BIN/getub -c $size $hfile > $tfile
EXECUTE_PROCESS (
@@ -99,8 +99,8 @@ if (TEST_CHECKUB STREQUAL "YES")
# if the return value is !=${TEST_EXPECT} bail out
if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
message (FATAL_ERROR "Failed: The output of ${TEST_HFILE}-ub did not match ${TEST_HFILE}.\n${TEST_ERROR}")
- endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
-else (TEST_CHECKUB STREQUAL "YES")
+ endif ()
+else ()
# call 'ubsize' to get the size of the user block
#ubsize=`$JAM_BIN/tellub $hfile`
EXECUTE_PROCESS (
@@ -112,8 +112,8 @@ else (TEST_CHECKUB STREQUAL "YES")
)
if (NOT TEST_H_STRING_LEN STREQUAL "0")
message (FATAL_ERROR "Failed: The output of ${TEST_HFILE} was NOT empty")
- endif (NOT TEST_H_STRING_LEN STREQUAL "0")
-endif (TEST_CHECKUB STREQUAL "YES")
+ endif ()
+endif ()
# everything went fine...
message ("Passed: The output of CHECK matched expectation")