Skip to content

Commit 7befb71

Browse files
Thirumalai-Shaktivelcertik
authored andcommitted
Add tests and register in CMakeLists
1 parent 9a5212f commit 7befb71

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

integration_tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,4 +441,5 @@ RUN(NAME test_argv_01 LABELS llvm) # TODO: Test using CPython
441441
RUN(NAME global_syms_01 LABELS cpython llvm c)
442442
RUN(NAME global_syms_02 LABELS cpython llvm c)
443443
RUN(NAME global_syms_03_b LABELS cpython llvm c)
444+
RUN(NAME global_syms_03_c LABELS cpython llvm c)
444445
RUN(NAME global_syms_04 LABELS cpython llvm c wasm wasm_x64)

integration_tests/global_syms_03_a.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
from lpython import i32
1+
from lpython import i32, f64
2+
3+
print("Imported from global_syms_03_a")
24

35
l_1: list[str] = ['Monday', 'Tuesday', 'Wednesday']
6+
l_1.append('Thursday')
47

58
def populate_lists() -> list[i32]:
69
return [10, -20]
710
l_2: list[i32] = populate_lists()
11+
12+
l_3: list[f64]
13+
l_3 = [1.0, 2.0, 3.0]

integration_tests/global_syms_03_b.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from global_syms_03_a import l_1, l_2
22

3-
assert len(l_1) == 3
3+
assert len(l_1) == 4
44
assert l_1[1] == "Tuesday"
55
assert l_2[1] == -20

integration_tests/global_syms_03_c.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import global_syms_03_a
2+
3+
assert len(global_syms_03_a.l_1) == 4
4+
assert global_syms_03_a.l_1[3] == "Thursday"
5+
assert global_syms_03_a.l_3 == [1.0, 2.0, 3.0]

0 commit comments

Comments
 (0)