aboutsummaryrefslogtreecommitdiff
path: root/tests/micropython/viper_error.py.exp
AgeCommit message (Collapse)Author
2020-06-27py/emitnative: Implement binary operations for viper uint operands.Damien George
uint types in viper mode can now be used for all binary operators except floor-divide and modulo. Fixes issue #1847 and issue #6177. Signed-off-by: Damien George <damien@micropython.org>
2018-09-15py/emitnative: Support arbitrary number of arguments to viper functions.Damien George
2018-09-15py/compile: Factor code that compiles viper type annotations.Damien George
2018-05-23py/emit: Combine yield value and yield-from emit funcs into one.Damien George
Reduces code size by: bare-arm: -24 minimal x86: -72 unix x64: -200 unix nanbox: -72 stm32: -52 cc3200: -32 esp8266: -84 esp32: -24
2017-11-24py/runtime: Add MP_BINARY_OP_CONTAINS as reverse of MP_BINARY_OP_IN.Damien George
Before this patch MP_BINARY_OP_IN had two meanings: coming from bytecode it meant that the args needed to be swapped, but coming from within the runtime meant that the args were already in the correct order. This lead to some confusion in the code and comments stating how args were reversed. It also lead to 2 bugs: 1) containment for a subclass of a native type didn't work; 2) the expression "{True} in True" would illegally succeed and return True. In both of these cases it was because the args to MP_BINARY_OP_IN ended up being reversed twice. To fix these things this patch introduces MP_BINARY_OP_CONTAINS which corresponds exactly to the __contains__ special method, and this is the operator that built-in types should implement. MP_BINARY_OP_IN is now only emitted by the compiler and is converted to MP_BINARY_OP_CONTAINS by swapping the arguments.
2017-03-14tests/micropython/viper_error: Add more tests to improve coverage.Damien George
2015-10-08py/emitnative: Raise ViperTypeError for unsupported unary ops.Damien George
2015-04-22tests: Add more tests for viper, including tests for ViperTypeError's.Damien George
2015-03-25tests: Add tests for SyntaxError, TypeError, and other missing things.Damien George
This is intended to improve coverage of the test suite.