diff options
Diffstat (limited to 'tests/basics/while_cond.py')
-rw-r--r-- | tests/basics/while_cond.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/basics/while_cond.py b/tests/basics/while_cond.py new file mode 100644 index 0000000000..449c5b66ea --- /dev/null +++ b/tests/basics/while_cond.py @@ -0,0 +1,18 @@ +# test while conditions which are optimised by the compiler + +while 0: + print(0) +else: + print(1) + +while 1: + print(2) + break + +while 2: + print(3) + break + +while -1: + print(4) + break |