From fcdfb601d5fc9f02db7971ff88453468ae9091b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 21 Jun 2022 15:23:22 +0300 Subject: [PATCH] Add a test for ignoring a function result --- integration_tests/CMakeLists.txt | 1 + integration_tests/expr_10.py | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 integration_tests/expr_10.py diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index 61d5c10e90..55f6d3d92f 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -133,6 +133,7 @@ RUN(NAME expr_04 LABELS cpython llvm c) RUN(NAME expr_05 LABELS cpython llvm) RUN(NAME expr_06 LABELS cpython llvm) RUN(NAME expr_08 LABELS llvm c) +RUN(NAME expr_10 LABELS cpython) RUN(NAME test_types_01 LABELS cpython llvm) RUN(NAME test_str_01 LABELS cpython llvm) RUN(NAME test_str_02 LABELS cpython llvm) diff --git a/integration_tests/expr_10.py b/integration_tests/expr_10.py new file mode 100644 index 0000000000..d932675749 --- /dev/null +++ b/integration_tests/expr_10.py @@ -0,0 +1,10 @@ +from ltypes import i32 + +def g() -> i32: + return 5 + +def test_fn1(): + i: i32 = g() + g() + +test_fn1()