tests/basics: Add memoryview test for big ints.
This commit is contained in:
parent
2e9e14980d
commit
e711e2d44a
@ -12,7 +12,3 @@ print(list(memoryview(array('b', [0x7f, -0x80]))))
|
||||
print(list(memoryview(array('B', [0x7f, 0x80, 0x81, 0xff]))))
|
||||
print(list(memoryview(array('h', [0x7f00, -0x8000]))))
|
||||
print(list(memoryview(array('H', [0x7f00, 0x8000, 0x8100, 0xffff]))))
|
||||
|
||||
# these constructors give an internal overflow in uPy
|
||||
#print(list(memoryview(array('i', [0x7f000000, -0x80000000]))))
|
||||
#print(list(memoryview(array('I', [0x7f000000, 0x80000000, 0x81000000, 0xffffffff]))))
|
||||
|
11
tests/basics/memoryview_intbig.py
Normal file
11
tests/basics/memoryview_intbig.py
Normal file
@ -0,0 +1,11 @@
|
||||
# test memoryview accessing maximum values for signed/unsigned elements
|
||||
try:
|
||||
from array import array
|
||||
memoryview
|
||||
except:
|
||||
import sys
|
||||
print("SKIP")
|
||||
sys.exit()
|
||||
|
||||
print(list(memoryview(array('i', [0x7f000000, -0x80000000]))))
|
||||
print(list(memoryview(array('I', [0x7f000000, 0x80000000, 0x81000000, 0xffffffff]))))
|
Loading…
Reference in New Issue
Block a user