Skip to content

Commit

Permalink
Add and modify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Smit-create committed May 15, 2022
1 parent c49d6ff commit ab3cc35
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions tests/loop1.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ def main0():
i = test_factorial_2(4)
j: i64
j = test_factorial_3(5)
print(i, j)

main0()
1 change: 1 addition & 0 deletions tests/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ filename = "loop1.py"
ast = true
asr = true
cpp = true
c = true

[[test]]
filename = "loop2.py"
Expand Down

0 comments on commit ab3cc35

Please sign in to comment.