tests/heapalloc_str: Test for alloc-free string operations.
Starts with concatenation with an empty string.
This commit is contained in:
parent
e2e663291d
commit
9ffc3ae0e7
14
tests/micropython/heapalloc_str.py
Normal file
14
tests/micropython/heapalloc_str.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# 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()
|
0
tests/micropython/heapalloc_str.py.exp
Normal file
0
tests/micropython/heapalloc_str.py.exp
Normal file
Loading…
x
Reference in New Issue
Block a user