forked from lcompilers/lpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supplementing pow tests (lcompilers#747)
- Loading branch information
1 parent
49d31c5
commit e2f98b7
Showing
13 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
def f(): | ||
x: str | ||
x = "a" | ||
print(pow(x,3)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
def f(): | ||
a: i64 | ||
b: i64 | ||
c: i64 | ||
d: i64 | ||
a = 1 | ||
b = 2 | ||
c = 3 | ||
d = 4 | ||
print(pow(a, b, c, d)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
def f(): | ||
x: list[i32] | ||
x = [2,3] | ||
a: i64 | ||
a = 3 | ||
print(pow(x,a)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
def f(): | ||
x: c32 | ||
x = 2+3j | ||
a: i64 | ||
b: i64 | ||
a = 2 | ||
b = 3 | ||
print(pow(x, a, b)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"basename": "asr-test_pow1-581ef42", | ||
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}", | ||
"infile": "tests/errors/test_pow1.py", | ||
"infile_hash": "a7ce7888e7e99bc753e16822749aaae4ee63641675990b3e2a34de10", | ||
"outfile": null, | ||
"outfile_hash": null, | ||
"stdout": null, | ||
"stdout_hash": null, | ||
"stderr": "asr-test_pow1-581ef42.stderr", | ||
"stderr_hash": "7f7cc07cf6f08f2d953d6e6c1f4892e6379faaf8aa668117234293d0", | ||
"returncode": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
style suggestion: Could have used '**' instead of 'pow' | ||
--> tests/errors/test_pow1.py:4:11 | ||
| | ||
4 | print(pow(x,3)) | ||
| ^^^^^^^^ '**' could be used instead | ||
|
||
semantic error: Arguments do not match for any generic procedure, pow | ||
--> tests/errors/test_pow1.py:4:11 | ||
| | ||
4 | print(pow(x,3)) | ||
| ^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"basename": "asr-test_pow2-0dcbd7d", | ||
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}", | ||
"infile": "tests/errors/test_pow2.py", | ||
"infile_hash": "78e130dfe23fbeee525591c4aa0b66aee134febaa06d61f4b92d2346", | ||
"outfile": null, | ||
"outfile_hash": null, | ||
"stdout": null, | ||
"stdout_hash": null, | ||
"stderr": "asr-test_pow2-0dcbd7d.stderr", | ||
"stderr_hash": "cd334c21c259215eb4236d3c14f43ad51bfffeb20fd0b6764673e059", | ||
"returncode": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
style suggestion: Could have used '**' instead of 'pow' | ||
--> tests/errors/test_pow2.py:10:11 | ||
| | ||
10 | print(pow(a, b, c, d)) | ||
| ^^^^^^^^^^^^^^^ '**' could be used instead | ||
|
||
semantic error: Arguments do not match for any generic procedure, pow | ||
--> tests/errors/test_pow2.py:10:11 | ||
| | ||
10 | print(pow(a, b, c, d)) | ||
| ^^^^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"basename": "asr-test_pow3-79749ed", | ||
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}", | ||
"infile": "tests/errors/test_pow3.py", | ||
"infile_hash": "1bc6f2980c730ce43909b01a55a513bd66e10203b146f81edffacfe5", | ||
"outfile": null, | ||
"outfile_hash": null, | ||
"stdout": null, | ||
"stdout_hash": null, | ||
"stderr": "asr-test_pow3-79749ed.stderr", | ||
"stderr_hash": "411d92743dcaaf1804201d0818957ca75447d8989b706abb3e4c353f", | ||
"returncode": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
style suggestion: Could have used '**' instead of 'pow' | ||
--> tests/errors/test_pow3.py:6:11 | ||
| | ||
6 | print(pow(x,a)) | ||
| ^^^^^^^^ '**' could be used instead | ||
|
||
semantic error: Arguments do not match for any generic procedure, pow | ||
--> tests/errors/test_pow3.py:6:11 | ||
| | ||
6 | print(pow(x,a)) | ||
| ^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"basename": "asr-test_pow4-ef60978", | ||
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}", | ||
"infile": "tests/errors/test_pow4.py", | ||
"infile_hash": "5d2a4db7380af57fed3553c4f12bc7b65015aedaaca59d25f44c932c", | ||
"outfile": null, | ||
"outfile_hash": null, | ||
"stdout": null, | ||
"stdout_hash": null, | ||
"stderr": "asr-test_pow4-ef60978.stderr", | ||
"stderr_hash": "e59a89d136c0faf4459152f48798e0f71c1ed0901eeaea5ab21fcbeb", | ||
"returncode": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
style suggestion: Could have used '**' instead of 'pow' | ||
--> tests/errors/test_pow4.py:8:11 | ||
| | ||
8 | print(pow(x, a, b)) | ||
| ^^^^^^^^^^^^ '**' could be used instead | ||
|
||
semantic error: Arguments do not match for any generic procedure, pow | ||
--> tests/errors/test_pow4.py:8:11 | ||
| | ||
8 | print(pow(x, a, b)) | ||
| ^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters