Commit e711e2d4 authored by Damien George's avatar Damien George
Browse files

tests/basics: Add memoryview test for big ints.

parent 2e9e1498
...@@ -12,7 +12,3 @@ print(list(memoryview(array('b', [0x7f, -0x80])))) ...@@ -12,7 +12,3 @@ print(list(memoryview(array('b', [0x7f, -0x80]))))
print(list(memoryview(array('B', [0x7f, 0x80, 0x81, 0xff])))) print(list(memoryview(array('B', [0x7f, 0x80, 0x81, 0xff]))))
print(list(memoryview(array('h', [0x7f00, -0x8000])))) print(list(memoryview(array('h', [0x7f00, -0x8000]))))
print(list(memoryview(array('H', [0x7f00, 0x8000, 0x8100, 0xffff])))) 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]))))
# test memoryview accessing maximum values for signed/unsigned elements
from array import array
import sys
print(list(memoryview(array('i', [0x7f000000, -0x80000000]))))
print(list(memoryview(array('I', [0x7f000000, 0x80000000, 0x81000000, 0xffffffff]))))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment