Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 239357e

Browse files
anutosh491Agent-Hellboy
authored andcommitted
Added explicit test for Out[S] (#2422)
1 parent 3545c4a commit 239357e

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

integration_tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ RUN(NAME func_dep_03 LABELS cpython llvm c)
775775
RUN(NAME func_dep_04 LABELS cpython llvm c)
776776
RUN(NAME func_internal_def_01 LABELS cpython llvm NOFAST)
777777
RUN(NAME func_01 LABELS cpython llvm)
778+
RUN(NAME func_02 LABELS c_sym)
778779

779780
RUN(NAME float_01 LABELS cpython llvm c wasm wasm_x64)
780781
RUN(NAME recursive_01 LABELS cpython llvm c wasm wasm_x64 wasm_x86)

integration_tests/func_02.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from lpython import S
2+
from sympy import pi
3+
4+
def func(r: Out[S]) -> None:
5+
r = pi
6+
7+
def test_func():
8+
z: S
9+
func(z)
10+
print(z)
11+
assert z == pi
12+
13+
test_func()

integration_tests/symbolics_13.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from lpython import S
2-
from sympy import pi, Symbol
2+
from sympy import pi
33

44
def func() -> S:
55
return pi
@@ -9,4 +9,4 @@ def test_func():
99
print(z)
1010
assert z == pi
1111

12-
test_func()
12+
test_func()

0 commit comments

Comments
 (0)