diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/micropython/viper_error.py | 5 | ||||
-rw-r--r-- | tests/micropython/viper_error.py.exp | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/micropython/viper_error.py b/tests/micropython/viper_error.py index 0762f50797..116bd4ea03 100644 --- a/tests/micropython/viper_error.py +++ b/tests/micropython/viper_error.py @@ -52,3 +52,8 @@ test("@micropython.viper\ndef f(): 1[x] = 1") # must raise an object test("@micropython.viper\ndef f(): raise 1") + +# unary ops not implemented +test("@micropython.viper\ndef f(x:int): +x") +test("@micropython.viper\ndef f(x:int): -x") +test("@micropython.viper\ndef f(x:int): ~x") diff --git a/tests/micropython/viper_error.py.exp b/tests/micropython/viper_error.py.exp index ad1ba34c60..1afcd4bdbe 100644 --- a/tests/micropython/viper_error.py.exp +++ b/tests/micropython/viper_error.py.exp @@ -10,3 +10,6 @@ ViperTypeError("can't load from 'int'",) ViperTypeError("can't store to 'int'",) ViperTypeError("can't store to 'int'",) ViperTypeError('must raise an object',) +ViperTypeError('unary op __pos__ not implemented',) +ViperTypeError('unary op __neg__ not implemented',) +ViperTypeError('unary op __invert__ not implemented',) |