micropython: add micropython component
This commit is contained in:
13
components/language/micropython/tests/basics/int_big_cmp.py
Normal file
13
components/language/micropython/tests/basics/int_big_cmp.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# test bignum comparisons
|
||||
|
||||
i = 1 << 65
|
||||
cases = (0, 1, -1, i, -i, i + 1, -(i + 1))
|
||||
|
||||
for lhs in cases:
|
||||
for rhs in cases:
|
||||
print("{} == {} = {}".format(lhs, rhs, lhs == rhs))
|
||||
print("{} != {} = {}".format(lhs, rhs, lhs != rhs))
|
||||
print("{} < {} = {}".format(lhs, rhs, lhs < rhs))
|
||||
print("{} > {} = {}".format(lhs, rhs, lhs > rhs))
|
||||
print("{} <= {} = {}".format(lhs, rhs, lhs <= rhs))
|
||||
print("{} >= {} = {}".format(lhs, rhs, lhs >= rhs))
|
Reference in New Issue
Block a user