diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index 8535c83194..617e964973 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -624,6 +624,7 @@ RUN(NAME symbolics_03 LABELS cpython_sym c_sym) RUN(NAME symbolics_04 LABELS cpython_sym c_sym) RUN(NAME symbolics_05 LABELS cpython_sym c_sym) RUN(NAME symbolics_06 LABELS cpython_sym c_sym) +RUN(NAME symbolics_07 LABELS cpython_sym c_sym) RUN(NAME sizeof_01 LABELS llvm c EXTRAFILES sizeof_01b.c) diff --git a/integration_tests/symbolics_07.py b/integration_tests/symbolics_07.py new file mode 100644 index 0000000000..52b3a3902a --- /dev/null +++ b/integration_tests/symbolics_07.py @@ -0,0 +1,22 @@ +from lpython import ccall + +@ccall(header="symengine/cwrapper.h") +def basic_new_heap() -> CPtr: + pass + +@ccall(header="symengine/cwrapper.h") +def basic_const_pi(x: CPtr) -> None: + pass + +@ccall(header="symengine/cwrapper.h") +def basic_str(x: CPtr) -> str: + pass + +def main0(): + x: CPtr = basic_new_heap() + basic_const_pi(x) + s: str = basic_str(x) + print(s) + assert s == "pi" + +main0()