From ab3cc35a2a1f036200570a6d8e419d476a86e2ef Mon Sep 17 00:00:00 2001 From: Smit-create Date: Sun, 15 May 2022 12:23:36 +0530 Subject: [PATCH] Add and modify tests --- run_tests.py | 5 +++++ tests/loop1.py | 1 + tests/tests.toml | 1 + 3 files changed, 7 insertions(+) diff --git a/run_tests.py b/run_tests.py index 53d4a5ea38..de83f8d2f3 100755 --- a/run_tests.py +++ b/run_tests.py @@ -49,6 +49,7 @@ def main(): mod_to_asr = test.get("mod_to_asr", False) llvm = test.get("llvm", False) cpp = test.get("cpp", False) + c = test.get("c", False) obj = test.get("obj", False) x86 = test.get("x86", False) bin_ = test.get("bin", False) @@ -83,6 +84,10 @@ def main(): run_test("cpp", "lpython --no-color --show-cpp {infile}", filename, update_reference, extra_args) + if c: + run_test("c", "lpython --no-color --show-c {infile}", + filename, update_reference, extra_args) + if tokens: run_test("tokens", "lpython --no-color --show-tokens {infile} -o {outfile}", filename, update_reference, extra_args) diff --git a/tests/loop1.py b/tests/loop1.py index 976639d586..c57e481e4a 100644 --- a/tests/loop1.py +++ b/tests/loop1.py @@ -35,5 +35,6 @@ def main0(): i = test_factorial_2(4) j: i64 j = test_factorial_3(5) + print(i, j) main0() diff --git a/tests/tests.toml b/tests/tests.toml index 4ab74ac229..15bd932bdc 100644 --- a/tests/tests.toml +++ b/tests/tests.toml @@ -144,6 +144,7 @@ filename = "loop1.py" ast = true asr = true cpp = true +c = true [[test]] filename = "loop2.py"