2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-23 18:34:02 +08:00
artiq/lit-test/test/integration/compare.py
whitequark 862ac1f90d lit-test/compiler -> lit-test/test.
Other directories in lit-test will host various parts of
the test harness.
2015-07-27 04:13:29 +03:00

20 lines
577 B
Python

# RUN: %python -m artiq.compiler.testbench.jit %s
# RUN: %python %s
assert 1 < 2 and not (2 < 1)
assert 2 > 1 and not (1 > 2)
assert 1 == 1 and not (1 == 2)
assert 1 != 2 and not (1 != 1)
assert 1 <= 1 and 1 <= 2 and not (2 <= 1)
assert 1 >= 1 and 2 >= 1 and not (1 >= 2)
assert 1 is 1 and not (1 is 2)
assert 1 is not 2 and not (1 is not 1)
x, y = [1], [1]
assert x is x and x is not y
#ARTIQ#assert range(10) is range(10) and range(10) is not range(11)
lst = [1, 2, 3]
assert 1 in lst and 0 not in lst
assert 1 in range(10) and 11 not in range(10) and -1 not in range(10)