circuitpython/tests/micropython/heapalloc_str.py
Paul Sokolovsky 9ffc3ae0e7 tests/heapalloc_str: Test for alloc-free string operations.
Starts with concatenation with an empty string.
2017-01-27 00:49:39 +03:00

15 lines
182 B
Python

# String operations which don't require allocation
import micropython
micropython.heap_lock()
b"" + b""
b"" + b"1"
b"2" + b""
"" + ""
"" + "1"
"2" + ""
micropython.heap_unlock()