summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/micropython/viper_binop_arith.py11
-rw-r--r--tests/micropython/viper_binop_arith.py.exp12
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/micropython/viper_binop_arith.py b/tests/micropython/viper_binop_arith.py
index d37450315f..4d711f1a9f 100644
--- a/tests/micropython/viper_binop_arith.py
+++ b/tests/micropython/viper_binop_arith.py
@@ -19,6 +19,17 @@ sub(-1, 2)
sub(-42, -3)
@micropython.viper
+def mul(x:int, y:int):
+ print(x * y)
+ print(y * x)
+mul(0, 1)
+mul(1, -1)
+mul(1, 2)
+mul(8, 3)
+mul(-3, 4)
+mul(-9, -6)
+
+@micropython.viper
def shl(x:int, y:int):
print(x << y)
shl(1, 0)
diff --git a/tests/micropython/viper_binop_arith.py.exp b/tests/micropython/viper_binop_arith.py.exp
index 15abcc2451..156e3aff5b 100644
--- a/tests/micropython/viper_binop_arith.py.exp
+++ b/tests/micropython/viper_binop_arith.py.exp
@@ -14,6 +14,18 @@
3
-39
39
+0
+0
+-1
+-1
+2
+2
+24
+24
+-12
+-12
+54
+54
1
8
1073741824