diff options
author | Damien George <damien.p.george@gmail.com> | 2015-04-22 23:18:28 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-04-22 23:18:28 +0100 |
commit | 40d43ea88dfff431dd863146dd2e62ea8c24683e (patch) | |
tree | fb9000e5d78f4fbaf63d0ea0533c56dbfb4c4a0f /tests/micropython/viper_cond.py | |
parent | 5e9810396f21698718eb26a3d4125bfeeb2f8859 (diff) |
tests: Add more tests for viper, including tests for ViperTypeError's.
Diffstat (limited to 'tests/micropython/viper_cond.py')
-rw-r--r-- | tests/micropython/viper_cond.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/micropython/viper_cond.py b/tests/micropython/viper_cond.py index 258a37812..a168afce9 100644 --- a/tests/micropython/viper_cond.py +++ b/tests/micropython/viper_cond.py @@ -1,4 +1,14 @@ -# using a bool as a conditional +# using False as a conditional +@micropython.viper +def f(): + x = False + if x: + pass + else: + print("not x", x) +f() + +# using True as a conditional @micropython.viper def f(): x = True |