diff options
author | Zoltán Vörös <zvoros@gmail.com> | 2021-06-12 15:09:24 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-06-13 10:30:14 +1000 |
commit | c4ed17ff345ee59f284a2f6d1ec18034eeb311a9 (patch) | |
tree | df9319c68a90fa4eedb72023d0f57f36f7f7ce10 /tests/cpydiff/module_array_constructor.py | |
parent | 3ab8806c0d2fe77e9785216563b419cfadff71b0 (diff) |
tests/cpydiff: Add test for array constructor with overflowing value.
Diffstat (limited to 'tests/cpydiff/module_array_constructor.py')
-rw-r--r-- | tests/cpydiff/module_array_constructor.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/cpydiff/module_array_constructor.py b/tests/cpydiff/module_array_constructor.py new file mode 100644 index 000000000..08cf2ef2d --- /dev/null +++ b/tests/cpydiff/module_array_constructor.py @@ -0,0 +1,10 @@ +""" +categories: Modules,array +description: Overflow checking is not implemented +cause: MicroPython implements implicit truncation in order to reduce code size and execution time +workaround: If CPython compatibility is needed then mask the value explicitly +""" +import array + +a = array.array("b", [257]) +print(a) |