From 074597f17279b273f2135e9596aaf3a2e1926f4c Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 10 Dec 2018 14:29:41 +1100 Subject: [PATCH] tests/extmod/uctypes_error: Add test for unsupported unary op. --- tests/extmod/uctypes_error.py | 6 ++++++ tests/extmod/uctypes_error.py.exp | 1 + 2 files changed, 7 insertions(+) diff --git a/tests/extmod/uctypes_error.py b/tests/extmod/uctypes_error.py index 95ba0fad44..68106ac782 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 802c260d2b..f2e9c12f7f 100644 --- a/tests/extmod/uctypes_error.py.exp +++ b/tests/extmod/uctypes_error.py.exp @@ -2,3 +2,4 @@ TypeError TypeError TypeError TypeError +TypeError