Skip to content

Commit 9ffc3ae

Browse files
committed
tests/heapalloc_str: Test for alloc-free string operations.
Starts with concatenation with an empty string.
1 parent e2e6632 commit 9ffc3ae

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

tests/micropython/heapalloc_str.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# String operations which don't require allocation
2+
import micropython
3+
4+
micropython.heap_lock()
5+
6+
b"" + b""
7+
b"" + b"1"
8+
b"2" + b""
9+
10+
"" + ""
11+
"" + "1"
12+
"2" + ""
13+
14+
micropython.heap_unlock()

tests/micropython/heapalloc_str.py.exp

Whitespace-only changes.

0 commit comments

Comments
 (0)