summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--tests/extmod/uctypes_sizeof.py5
-rw-r--r--tests/extmod/uctypes_sizeof.py.exp1
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/extmod/uctypes_sizeof.py b/tests/extmod/uctypes_sizeof.py
index 2f2a0c0d00..93de2abb08 100644
--- a/tests/extmod/uctypes_sizeof.py
+++ b/tests/extmod/uctypes_sizeof.py
@@ -6,6 +6,7 @@ desc = {
# arr2 is array at offset 0, size 2, of structures defined recursively
"arr2": (uctypes.ARRAY | 0, 2, {"b": uctypes.UINT8 | 0}),
"arr3": (uctypes.ARRAY | 2, uctypes.UINT16 | 2),
+ "arr4": (uctypes.ARRAY | 0, 2, {"b": uctypes.UINT8 | 0, "w": uctypes.UINT16 | 1})
}
data = bytearray(b"01234567")
@@ -24,3 +25,7 @@ try:
print(uctypes.sizeof(S.arr3[0]))
except TypeError:
print("TypeError")
+
+print(uctypes.sizeof(S.arr4))
+assert uctypes.sizeof(S.arr4) == 6
+
diff --git a/tests/extmod/uctypes_sizeof.py.exp b/tests/extmod/uctypes_sizeof.py.exp
index d1e81238b4..b0e3a0ac6b 100644
--- a/tests/extmod/uctypes_sizeof.py.exp
+++ b/tests/extmod/uctypes_sizeof.py.exp
@@ -2,3 +2,4 @@
2
4
TypeError
+6