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

Skip to content

Commit f520779

Browse files
committed
TEST: Update reference tests
1 parent d51e40b commit f520779

8 files changed

+72
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"basename": "asr-func_02-b439474",
3+
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
4+
"infile": "tests/errors/func_02.py",
5+
"infile_hash": "452658f9bae7ccab4d21b9b1c993adb7fbaf117c093dd82672755aa5",
6+
"outfile": null,
7+
"outfile_hash": null,
8+
"stdout": null,
9+
"stdout_hash": null,
10+
"stderr": "asr-func_02-b439474.stderr",
11+
"stderr_hash": "51b7e0552f91115242b7c38f82c258b3d8dda88c9596ddee5388e0a1",
12+
"returncode": 2
13+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
semantic error: Assignment to an input function parameter `n` is not allowed
2+
--> tests/errors/func_02.py:4:5
3+
|
4+
4 | n = 5
5+
| ^
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"basename": "asr-func_03-cd744a0",
3+
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
4+
"infile": "tests/errors/func_03.py",
5+
"infile_hash": "763216ad3cb1090dc322e63706d4f92be4e806b1fc2df6f160d02fd0",
6+
"outfile": null,
7+
"outfile_hash": null,
8+
"stdout": null,
9+
"stdout_hash": null,
10+
"stderr": "asr-func_03-cd744a0.stderr",
11+
"stderr_hash": "cdd453e23646de3ff697ffe6a99908520edb195d28871de63db5a430",
12+
"returncode": 2
13+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
semantic error: Assignment to an input function parameter `l` is not allowed
2+
--> tests/errors/func_03.py:4:5
3+
|
4+
4 | l[5] = 5
5+
| ^
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"basename": "asr-func_04-eef2656",
3+
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
4+
"infile": "tests/errors/func_04.py",
5+
"infile_hash": "763216ad3cb1090dc322e63706d4f92be4e806b1fc2df6f160d02fd0",
6+
"outfile": null,
7+
"outfile_hash": null,
8+
"stdout": null,
9+
"stdout_hash": null,
10+
"stderr": "asr-func_04-eef2656.stderr",
11+
"stderr_hash": "c0ef482d68b30b03615927ecd02a30b14ff4d24b5673b7399671ee79",
12+
"returncode": 2
13+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
semantic error: Assignment to an input function parameter `l` is not allowed
2+
--> tests/errors/func_04.py:4:5
3+
|
4+
4 | l[5] = 5
5+
| ^
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"basename": "asr-func_05-c22b921",
3+
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
4+
"infile": "tests/errors/func_05.py",
5+
"infile_hash": "70a0b0ddad67252c7488d322ffc565a6669e1f79b96c3ef3014b0d0a",
6+
"outfile": null,
7+
"outfile_hash": null,
8+
"stdout": null,
9+
"stdout_hash": null,
10+
"stderr": "asr-func_05-c22b921.stderr",
11+
"stderr_hash": "9611beb75ae308f86e573592164c5aca50c4e1acec2e91e48687ba96",
12+
"returncode": 2
13+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
semantic error: Simple Type i32 cannot be intent InOut/Out
2+
--> tests/errors/func_05.py:3:7
3+
|
4+
3 | def f(n: InOut[i32]):
5+
| ^^^^^^^^^^^^^

0 commit comments

Comments
 (0)