2016-05-07 21:18:17 +01:00
|
|
|
# test memoryview accessing maximum values for signed/unsigned elements
|
2017-02-15 15:11:16 +00:00
|
|
|
try:
|
|
|
|
from array import array
|
|
|
|
memoryview
|
|
|
|
except:
|
|
|
|
print("SKIP")
|
2017-06-10 18:03:01 +01:00
|
|
|
raise SystemExit
|
2016-05-07 21:18:17 +01:00
|
|
|
|
|
|
|
print(list(memoryview(b'\x7f\x80\x81\xff')))
|
|
|
|
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]))))
|