artiq/lit-test/compiler/integration/while.py
whitequark 20f5f8217d Make sure tests pass both on ARTIQ Python and CPython.
In some cases (the `is` operator and wraparound arithmetics)
the tests will only pass on ARTIQ Python. These are conditionally
commented out.
2015-07-23 08:09:25 +03:00

32 lines
397 B
Python

# RUN: %python -m artiq.compiler.testbench.jit %s
# RUN: %python %s
cond, count = True, 0
while cond:
count += 1
cond = False
assert count == 1
while False:
pass
else:
assert True
cond = True
while cond:
cond = False
else:
assert True
while True:
break
assert False
else:
assert False
cond = True
while cond:
cond = False
continue
assert False