Skip to content

Commit 6a6a9e7

Browse files
committed
TEST: Update reference tests
1 parent 283cc77 commit 6a6a9e7

6 files changed

+54
-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": "f8a6eed44ebd1dee435e6db842a874c41b8ba2b13d88d16944a4d265",
6+
"outfile": null,
7+
"outfile_hash": null,
8+
"stdout": null,
9+
"stdout_hash": null,
10+
"stderr": "asr-func_03-cd744a0.stderr",
11+
"stderr_hash": "8807deedff76aa449cbe96f3b904ae84af8d2a1cb648b7d0bffe0398",
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: Modifying input function parameter `l` is not allowed
2+
--> tests/errors/func_03.py:4:5
3+
|
4+
4 | l.append(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": "70a0b0ddad67252c7488d322ffc565a6669e1f79b96c3ef3014b0d0a",
6+
"outfile": null,
7+
"outfile_hash": null,
8+
"stdout": null,
9+
"stdout_hash": null,
10+
"stderr": "asr-func_04-eef2656.stderr",
11+
"stderr_hash": "9d46d8d3ba2904e6a87e73ffaf051da8b9159b06cd15ec1ff471009e",
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_04.py:3:7
3+
|
4+
3 | def f(n: InOut[i32]):
5+
| ^^^^^^^^^^^^^

0 commit comments

Comments
 (0)