summaryrefslogtreecommitdiff
path: root/test/builtins/shl_int.sail
diff options
context:
space:
mode:
Diffstat (limited to 'test/builtins/shl_int.sail')
-rw-r--r--test/builtins/shl_int.sail18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/builtins/shl_int.sail b/test/builtins/shl_int.sail
new file mode 100644
index 00000000..c65baefc
--- /dev/null
+++ b/test/builtins/shl_int.sail
@@ -0,0 +1,18 @@
+default Order dec
+
+$include <exception_basic.sail>
+$include <flow.sail>
+$include <vector_dec.sail>
+$include <arith.sail>
+
+function main (() : unit) -> unit = {
+ assert(shl_int(1, 10) == 1024);
+ assert(shl_int(1, 2) == 4);
+ assert(shl_int(1, 3) == 8);
+ assert(shl_int(1, 4) == 16);
+ assert(shl_int(1, 5) == 32);
+ assert(shl_int(1, 6) == 64);
+ assert(shl_int(8, 0) == 8);
+ assert(shl_int(8, 2) == 32);
+ assert(shl_int(8, 3) == 64);
+} \ No newline at end of file