Skip to content

Commit

Permalink
TEST: Add for const step in loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed Feb 7, 2024
1 parent 324bd3b commit b26d942
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions integration_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ RUN(NAME loop_04 LABELS cpython llvm c)
RUN(NAME loop_05 LABELS cpython llvm c)
RUN(NAME loop_06 LABELS cpython llvm c NOFAST)
RUN(NAME loop_07 LABELS cpython llvm c)
RUN(NAME loop_08 LABELS cpython llvm c)
RUN(NAME if_01 LABELS cpython llvm c wasm wasm_x86 wasm_x64)
RUN(NAME if_02 LABELS cpython llvm c wasm wasm_x86 wasm_x64)
RUN(NAME if_03 FAIL LABELS cpython llvm c NOFAST)
Expand Down
13 changes: 13 additions & 0 deletions integration_tests/loop_08.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from lpython import i32, Const

def main0():
i: i32
n: Const[i32] = 10
M2: Const[i32] = 2
y: i32 = 0
for i in range(0, n, M2): # each M2 block in A cols and B rows # !!!!!!!!!!!!!!
y = y + 2
print(y)
assert(y == 10)

main0()

0 comments on commit b26d942

Please sign in to comment.