Skip to content

Commit

Permalink
tests/micropython: Format new viper tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Jun 25, 2020
1 parent 8906c05 commit 6f00214
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/micropython/viper_binop_arith_uint.py
@@ -1,5 +1,6 @@
# test arithmetic operators with uint type


@micropython.viper
def add(x: uint, y: uint):
return x + y, y + x
Expand All @@ -24,6 +25,7 @@ def sub(x: uint, y: uint):
def mul(x: uint, y: uint):
return x * y, y * x


print("mul")
print(*mul(2, 3))
print(*(x & 0xFFFFFFFF for x in mul(2, -3)))
Expand Down
1 change: 1 addition & 0 deletions tests/micropython/viper_binop_bitwise_uint.py
@@ -1,5 +1,6 @@
# test bitwise operators on uint type


@micropython.viper
def shl(x: uint, y: uint) -> uint:
return x << y
Expand Down
1 change: 1 addition & 0 deletions tests/micropython/viper_binop_comp_uint.py
@@ -1,5 +1,6 @@
# test comparison operators with uint type


@micropython.viper
def f(x: uint, y: uint):
if x < y:
Expand Down

0 comments on commit 6f00214

Please sign in to comment.