Skip to content

Commit

Permalink
Added explicit test for Out[S] (lcompilers#2422)
Browse files Browse the repository at this point in the history
  • Loading branch information
anutosh491 committed Nov 13, 2023
1 parent b19dc21 commit 03ce89b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions integration_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@ RUN(NAME func_dep_03 LABELS cpython llvm c)
RUN(NAME func_dep_04 LABELS cpython llvm c)
RUN(NAME func_internal_def_01 LABELS cpython llvm NOFAST)
RUN(NAME func_01 LABELS cpython llvm)
RUN(NAME func_02 LABELS c_sym)

RUN(NAME float_01 LABELS cpython llvm c wasm wasm_x64)
RUN(NAME recursive_01 LABELS cpython llvm c wasm wasm_x64 wasm_x86)
Expand Down
13 changes: 13 additions & 0 deletions integration_tests/func_02.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from lpython import S
from sympy import pi

def func(r: Out[S]) -> None:
r = pi

def test_func():
z: S
func(z)
print(z)
assert z == pi

test_func()
4 changes: 2 additions & 2 deletions integration_tests/symbolics_13.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from lpython import S
from sympy import pi, Symbol
from sympy import pi

def func() -> S:
return pi
Expand All @@ -9,4 +9,4 @@ def test_func():
print(z)
assert z == pi

test_func()
test_func()

0 comments on commit 03ce89b

Please sign in to comment.