Skip to content

Commit 6c23486

Browse files
Add a test and register in CMakeLists
1 parent 0c4e081 commit 6c23486

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

integration_tests/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,4 +420,5 @@ RUN(NAME comp_01 LABELS cpython llvm wasm wasm_x64)
420420
RUN(NAME bit_operations_i32 LABELS cpython llvm wasm wasm_x64)
421421
RUN(NAME bit_operations_i64 LABELS cpython llvm wasm)
422422

423-
RUN(NAME test_argv_01 LABELS llvm) # TODO: Test using CPython
423+
RUN(NAME test_argv_01 LABELS llvm) # TODO: Test using CPython
424+
RUN(NAME global_syms_01 LABELS cpython)

integration_tests/global_syms_01.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from ltypes import i32
2+
3+
x: list[i32]
4+
x = [1, 2]
5+
i: i32
6+
i = x[0]
7+
8+
def test_global_symbols():
9+
assert i == 1
10+
assert x[1] == 2
11+
12+
test_global_symbols()

0 commit comments

Comments
 (0)