summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--run_tests.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 5819680..897ee67 100644
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -222,4 +222,17 @@ run_test "./loop loop_gt 10"
clear_memory 100
run_test "./loop loop_ge 10"
+###############################################################################
+#bit rotate left tests (not using the OpenCL C rotate builtin)
+###############################################################################
+
+#rotl(0x1, 1) = 0x2
+run_test "./math-int rotl 1 1 2"
+#rotl(0x1, 32) = 0x1
+run_test "./math-int rotl 1 32 1"
+#rotl(0xffffffff, 5) = 0xffffffff
+run_test "./math-int rotl -1 5 -1"
+#rotl(0x00001000, 23) = 0x8
+run_test "./math-int rotl 4096 23 8"
+
echo "$PASS passes, $FAIL fails"