tests/extmod/uctypes_ptr_le: Test int() operation on a pointer field.
This commit is contained in:
parent
9d864bde04
commit
0de6815ec1
@ -22,6 +22,9 @@ buf = addr.to_bytes(uctypes.sizeof(desc), "little")
|
||||
|
||||
S = uctypes.struct(uctypes.addressof(buf), desc, uctypes.LITTLE_ENDIAN)
|
||||
|
||||
print(addr == int(S.ptr))
|
||||
print(addr == int(S.ptr2))
|
||||
|
||||
print(S.ptr[0])
|
||||
assert S.ptr[0] == ord("0")
|
||||
print(S.ptr[1])
|
||||
|
@ -1,3 +1,5 @@
|
||||
True
|
||||
True
|
||||
48
|
||||
49
|
||||
0x3130
|
||||
|
Loading…
Reference in New Issue
Block a user