Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[tests] register tests/expr17.py #2580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tests/reference/python-expr17-3b84714.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"basename": "python-expr17-3b84714",
"cmd": "lpython --no-color --show-python {infile}",
"infile": "tests/expr17.py",
"infile_hash": "105d03de28e04eac6f02555286cf2b954caa81d7135618017aeefe79",
"outfile": null,
"outfile_hash": null,
"stdout": "python-expr17-3b84714.stdout",
"stdout_hash": "c5754f71e1cd9a019d7289d5ccee634a42d75ac775b0e115eea48f03",
"stderr": null,
"stderr_hash": null,
"returncode": 0
}
14 changes: 14 additions & 0 deletions tests/reference/python-expr17-3b84714.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
def if_check():
a: i32
a = 4
if (a) < (0):
print("negative value")
else:
if (a) > (0):
print("positive value")
else:
print("zero")




Comment on lines +12 to +14
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excess lines here should not be present. I think this can be handled in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will create another PR for it.

Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created an issue for it here #2583. I think this is good to merge.

4 changes: 4 additions & 0 deletions tests/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ cpp = true
filename = "expr16.py"
asr = true

[[test]]
filename = "expr17.py"
python = true

[[test]]
filename = "expr_01.py"
ast = true
Expand Down