Skip to content

Commit ea5f390

Browse files
committed
Update reference tests
1 parent b5404ab commit ea5f390

8 files changed

+223
-51
lines changed

tests/reference/asr-bindc_01-6d521a9.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"basename": "asr-bindc_01-6d521a9",
33
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
44
"infile": "tests/../integration_tests/bindc_01.py",
5-
"infile_hash": "f628ce81b32f2730f936232bb235f39d4372912bc332f3c97e983ad7",
5+
"infile_hash": "1441484a47934788883f64638ba47a736d0b999bc15e5723600c8f16",
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-bindc_01-6d521a9.stdout",
9-
"stdout_hash": "c1c5afabc9ecb18c731ad21825ee23c181c1965e4acf5fd2776b2008",
9+
"stdout_hash": "d1aa3170f8f602e7c9d2ef202a5c6fbd4097e2f1d66184d69bcc74d0",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-bindc_01-6d521a9.stdout

Lines changed: 150 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
_global_symbols:
66
(Module
77
(SymbolTable
8-
4
8+
6
99
{
1010
_lpython_main_program:
1111
(Function
1212
(SymbolTable
13-
3
13+
5
1414
{
1515

1616
})
@@ -30,18 +30,19 @@
3030
[]
3131
.false.
3232
)
33+
[test_issue_1781
34+
f]
3335
[]
34-
[]
35-
[(CPtrToPointer
36-
(Var 4 queries)
37-
(Var 4 x)
36+
[(SubroutineCall
37+
6 test_issue_1781
3838
()
39-
)
40-
(Print
39+
[]
4140
()
42-
[(Var 4 queries)
43-
(Var 4 x)]
41+
)
42+
(SubroutineCall
43+
6 f
4444
()
45+
[]
4546
()
4647
)]
4748
()
@@ -50,37 +51,150 @@
5051
.false.
5152
()
5253
),
53-
queries:
54-
(Variable
55-
4
56-
queries
54+
f:
55+
(Function
56+
(SymbolTable
57+
2
58+
{
59+
queries:
60+
(Variable
61+
2
62+
queries
63+
[]
64+
Local
65+
()
66+
()
67+
Default
68+
(CPtr)
69+
Source
70+
Public
71+
Required
72+
.false.
73+
),
74+
x:
75+
(Variable
76+
2
77+
x
78+
[]
79+
Local
80+
()
81+
()
82+
Default
83+
(Pointer
84+
(Integer 2 [])
85+
)
86+
Source
87+
Public
88+
Required
89+
.false.
90+
)
91+
})
92+
f
93+
(FunctionType
94+
[]
95+
()
96+
Source
97+
Implementation
98+
()
99+
.false.
100+
.false.
101+
.false.
102+
.false.
103+
.false.
104+
[]
105+
[]
106+
.false.
107+
)
57108
[]
58-
Local
59-
()
109+
[]
110+
[(=
111+
(Var 2 queries)
112+
(PointerNullConstant
113+
(CPtr)
114+
)
115+
()
116+
)
117+
(CPtrToPointer
118+
(Var 2 queries)
119+
(Var 2 x)
120+
()
121+
)
122+
(Print
123+
()
124+
[(Var 2 queries)
125+
(Var 2 x)]
126+
()
127+
()
128+
)]
60129
()
61-
Default
62-
(CPtr)
63-
Source
64130
Public
65-
Required
66131
.false.
132+
.false.
133+
()
67134
),
68-
x:
69-
(Variable
70-
4
71-
x
135+
test_issue_1781:
136+
(Function
137+
(SymbolTable
138+
3
139+
{
140+
p:
141+
(Variable
142+
3
143+
p
144+
[]
145+
Local
146+
()
147+
()
148+
Default
149+
(CPtr)
150+
Source
151+
Public
152+
Required
153+
.false.
154+
)
155+
})
156+
test_issue_1781
157+
(FunctionType
158+
[]
159+
()
160+
Source
161+
Implementation
162+
()
163+
.false.
164+
.false.
165+
.false.
166+
.false.
167+
.false.
168+
[]
169+
[]
170+
.false.
171+
)
72172
[]
73-
Local
74-
()
75-
()
76-
Default
77-
(Pointer
78-
(Integer 2 [])
173+
[]
174+
[(=
175+
(Var 3 p)
176+
(PointerNullConstant
177+
(CPtr)
178+
)
179+
()
79180
)
80-
Source
181+
(Assert
182+
(CPtrCompare
183+
(Var 3 p)
184+
Eq
185+
(PointerNullConstant
186+
(CPtr)
187+
)
188+
(Logical 4 [])
189+
()
190+
)
191+
()
192+
)]
193+
()
81194
Public
82-
Required
83195
.false.
196+
.false.
197+
()
84198
)
85199
})
86200
_global_symbols
@@ -91,13 +205,13 @@
91205
main_program:
92206
(Program
93207
(SymbolTable
94-
2
208+
4
95209
{
96210
_lpython_main_program:
97211
(ExternalSymbol
98-
2
212+
4
99213
_lpython_main_program
100-
4 _lpython_main_program
214+
6 _lpython_main_program
101215
_global_symbols
102216
[]
103217
_lpython_main_program
@@ -107,7 +221,7 @@
107221
main_program
108222
[_global_symbols]
109223
[(SubroutineCall
110-
2 _lpython_main_program
224+
4 _lpython_main_program
111225
()
112226
[]
113227
()

tests/reference/asr-bindc_02-bc1a7ea.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-bindc_02-bc1a7ea.stdout",
9-
"stdout_hash": "a48a2ddd1469559be941968442243d048382d13bccf878ab3dd788d7",
9+
"stdout_hash": "a74aa56cff206d4ef8fb0766f1cf596c122255882a7df3f5e4fcf4e7",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-bindc_02-bc1a7ea.stdout

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@
130130
[]
131131
[]
132132
[(=
133+
(Var 193 yq)
134+
(PointerNullConstant
135+
(CPtr)
136+
)
137+
()
138+
)
139+
(=
133140
(ArrayItem
134141
(Var 193 y)
135142
[(()
@@ -284,8 +291,12 @@
284291
queries
285292
[]
286293
Local
287-
()
288-
()
294+
(PointerNullConstant
295+
(CPtr)
296+
)
297+
(PointerNullConstant
298+
(CPtr)
299+
)
289300
Default
290301
(CPtr)
291302
Source

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-structs_02-2ab459a.stdout",
9-
"stdout_hash": "f56302bba116e03b67d1812db40060ab8017dd5ce79b2bdff7baf644",
9+
"stdout_hash": "ae8e8d2163b51eb20e19e6257618899aa4fbe78452e760a38608651d",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,14 @@
368368
)
369369
[f]
370370
[]
371-
[(SubroutineCall
371+
[(=
372+
(Var 4 b)
373+
(PointerNullConstant
374+
(CPtr)
375+
)
376+
()
377+
)
378+
(SubroutineCall
372379
7 f
373380
()
374381
[((Var 4 b))]

tests/reference/llvm-bindc_01-c984f09.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"basename": "llvm-bindc_01-c984f09",
33
"cmd": "lpython --no-color --show-llvm {infile} -o {outfile}",
44
"infile": "tests/../integration_tests/bindc_01.py",
5-
"infile_hash": "f628ce81b32f2730f936232bb235f39d4372912bc332f3c97e983ad7",
5+
"infile_hash": "1441484a47934788883f64638ba47a736d0b999bc15e5723600c8f16",
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "llvm-bindc_01-c984f09.stdout",
9-
"stdout_hash": "7e1b82f490b9a95ea81f4754694a725b89f16080d738e77e35462e9f",
9+
"stdout_hash": "15541f2cf2a7100742ac6bb2210e4a744c0964f28d769e02a2f382c5",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

0 commit comments

Comments
 (0)