You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
307 B
10 lines
307 B
4 years ago
|
# Test that int.from_bytes() for small number of bytes generates
|
||
|
# small int.
|
||
|
import micropython
|
||
|
|
||
|
micropython.heap_lock()
|
||
|
print(int.from_bytes(b"1", "little"))
|
||
|
print(int.from_bytes(b"12", "little"))
|
||
|
print(int.from_bytes(b"2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", "little"))
|
||
|
micropython.heap_unlock()
|