Skip to content

Commit 3e183fd

Browse files
committed
TEST: For expr as stmt
1 parent e5de594 commit 3e183fd

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

integration_tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ RUN(NAME test_list_repeat LABELS cpython llvm NOFAST)
507507
RUN(NAME test_list_reverse LABELS cpython llvm)
508508
RUN(NAME test_list_pop LABELS cpython llvm NOFAST) # TODO: Remove NOFAST from here.
509509
RUN(NAME test_list_pop2 LABELS cpython llvm NOFAST) # TODO: Remove NOFAST from here.
510+
RUN(NAME test_list_pop3 LABELS cpython llvm)
510511
RUN(NAME test_list_compare LABELS cpython llvm)
511512
RUN(NAME test_tuple_01 LABELS cpython llvm c)
512513
RUN(NAME test_tuple_02 LABELS cpython llvm c NOFAST)

integration_tests/test_list_pop3.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from lpython import i32
2+
3+
def main0():
4+
a: list[i32] = [3, 4, 5]
5+
i: i32
6+
for i in range(10):
7+
a.append(1)
8+
a.pop()
9+
10+
print(a)
11+
assert a[-1] == 5
12+
assert len(a) == 3
13+
14+
main0()

0 commit comments

Comments
 (0)