circuitpython/tests/basics/int_big_or.py
Diego Elio Pettenò dd5d7c86d2 Fix up end of file and trailing whitespace.
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-06-03 10:56:35 +01:00

46 lines
742 B
Python

print(0 | (1 << 80))
a = 0xfffffffffffffffffffffffffffff
print(a | (1 << 200))
# test + +
print(0 | (1 << 80))
print((1 << 80) | (1 << 80))
print((1 << 80) | 0)
a = 0xfffffffffffffffffffffffffffff
print(a | (1 << 100))
print(a | (1 << 200))
print(a | a == 0)
print(bool(a | a))
# test - +
print((-1 << 80) | (1 << 80))
print((-1 << 80) | 0)
print((-a) | (1 << 100))
print((-a) | (1 << 200))
print((-a) | a == 0)
print(bool((-a) | a))
# test + -
print(0 | (-1 << 80))
print((1 << 80) | (-1 << 80))
print(a | (-1 << 100))
print(a | (-1 << 200))
print(a | (-a) == 0)
print(bool(a | (-a)))
# test - -
print((-1 << 80) | (-1 << 80))
print((-a) | (-1 << 100))
print((-a) | (-1 << 200))
print((-a) | (-a) == 0)
print(bool((-a) | (-a)))