summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-12-10 14:29:41 +1100
committerDamien George <damien.p.george@gmail.com>2018-12-10 14:29:41 +1100
commit074597f17279b273f2135e9596aaf3a2e1926f4c (patch)
tree83d746b5feb01fed9178d54af7719557efeb2678 /tests
parent0de6815ec1ca4af25ea846a6268b533ce4681181 (diff)
tests/extmod/uctypes_error: Add test for unsupported unary op.
Diffstat (limited to 'tests')
-rw-r--r--tests/extmod/uctypes_error.py6
-rw-r--r--tests/extmod/uctypes_error.py.exp1
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/extmod/uctypes_error.py b/tests/extmod/uctypes_error.py
index 95ba0fad4..68106ac78 100644
--- a/tests/extmod/uctypes_error.py
+++ b/tests/extmod/uctypes_error.py
@@ -35,3 +35,9 @@ try:
S.x = 1
except TypeError:
print('TypeError')
+
+# unsupported unary op
+try:
+ hash(S)
+except TypeError:
+ print('TypeError')
diff --git a/tests/extmod/uctypes_error.py.exp b/tests/extmod/uctypes_error.py.exp
index 802c260d2..f2e9c12f7 100644
--- a/tests/extmod/uctypes_error.py.exp
+++ b/tests/extmod/uctypes_error.py.exp
@@ -2,3 +2,4 @@ TypeError
TypeError
TypeError
TypeError
+TypeError