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

Skip to content

Commit 2355385

Browse files
committed
Update reference tests
1 parent d006b06 commit 2355385

File tree

4 files changed

+27
-24
lines changed

4 files changed

+27
-24
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"basename": "asr-bindc_10e-8b10394",
3+
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
4+
"infile": "tests/errors/bindc_10e.py",
5+
"infile_hash": "36d1b5d366716d6a601db544fe8ff32aba76518181e71a98a4e6500c",
6+
"outfile": null,
7+
"outfile_hash": null,
8+
"stdout": null,
9+
"stdout_hash": null,
10+
"stderr": "asr-bindc_10e-8b10394.stderr",
11+
"stderr_hash": "7686dd8c9b718548d301e28d39cd15a85b00030172c5658b38a75af5",
12+
"returncode": 2
13+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
semantic error: The struct in c_p_pointer must be C interoperable
2+
--> tests/errors/bindc_10e.py:23:38
3+
|
4+
23 | p2: Pointer[S] = c_p_pointer(p1, S)
5+
| ^ not C interoperable
6+
|
7+
15 | class S:
8+
| ~~~~~~~~...
9+
...
10+
|
11+
17 | b: i64
12+
| ...~~~~~~~~~~ help: add the @ccallable decorator to this struct to make it C interoperable

tests/reference/asr-structs_02-2ab459a.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"basename": "asr-structs_02-2ab459a",
33
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
44
"infile": "tests/../integration_tests/structs_02.py",
5-
"infile_hash": "6d54aa7c2bb850cbce2c0add7b77f9f72c9323162ae080c7eef4867a",
5+
"infile_hash": "281bc75fb743f18fb6f011b278d7ab8103cc688f5856a59cb1f54895",
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-structs_02-2ab459a.stdout",
9-
"stdout_hash": "e5df0fb84bfc694b884736c1c4a5ddaec25933d8dba54e894de3e961",
9+
"stdout_hash": "3a3e1108225886c52d459a08a26d5b35d4aea338982034d43079769d",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-structs_02-2ab459a.stdout

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -304,28 +304,6 @@
304304
()
305305
)
306306
()
307-
)
308-
(CPtrToPointer
309-
(Var 3 a)
310-
(Var 3 a2)
311-
()
312-
()
313-
)
314-
(Print
315-
()
316-
[(Var 3 a)
317-
(Var 3 a2)
318-
(GetPointer
319-
(Var 3 a1)
320-
(Pointer
321-
(Struct
322-
8 A
323-
)
324-
)
325-
()
326-
)]
327-
()
328-
()
329307
)]
330308
()
331309
Public

0 commit comments

Comments
 (0)