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
|
@ -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()
|
Loading…
Reference in New Issue