kopia lustrzana https://github.com/micropython/micropython
nanbox_smallint: Fix incorrect use of int() in test.
The literal is in base 16 but int()'s default radix in cpython is 10, not 0. Signed-off-by: Jeff Epler <jepler@gmail.com>pull/13576/head
rodzic
b4f59984f7
commit
16b89c3c8e
|
@ -23,17 +23,17 @@ if float("1e100") == float("inf"):
|
|||
raise SystemExit
|
||||
|
||||
micropython.heap_lock()
|
||||
print(int("0x80000000"))
|
||||
print(int("0x80000000", 16))
|
||||
micropython.heap_unlock()
|
||||
|
||||
# This is the most positive small integer.
|
||||
micropython.heap_lock()
|
||||
print(int("0x3fffffffffff"))
|
||||
print(int("0x3fffffffffff", 16))
|
||||
micropython.heap_unlock()
|
||||
|
||||
# This is the most negative small integer.
|
||||
micropython.heap_lock()
|
||||
print(int("-0x3fffffffffff") - 1)
|
||||
print(int("-0x3fffffffffff", 16) - 1)
|
||||
micropython.heap_unlock()
|
||||
|
||||
x = 1
|
||||
|
|
Ładowanie…
Reference in New Issue