Skip to content

Commit 573d806

Browse files
committed
TEST: WAT: Update reference tests
1 parent 0f92df6 commit 573d806

14 files changed

+278
-1291
lines changed

tests/reference/asr-test_complex_01-a6def58.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"basename": "asr-test_complex_01-a6def58",
33
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
44
"infile": "tests/../integration_tests/test_complex_01.py",
5-
"infile_hash": "073cdd5f46b6ff3c9d5e7e79950d1a4fc46ee760ab04ce8a303afdad",
5+
"infile_hash": "9bb8005b8d6c2f5c13d1df7533848eafe15b52f762aa9d889e818ae5",
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-test_complex_01-a6def58.stdout",
9-
"stdout_hash": "bb3e83880f2c7ddb82cbd1d84bcd7ae99e8ffde68285534adc5146c7",
9+
"stdout_hash": "3fcef1d469f3adec704e871e734661939f8b2859f643f47268962c66",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-test_complex_01-a6def58.stdout

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/reference/wat-bool1-234bcd1.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": "wat-bool1-234bcd1.stdout",
9-
"stdout_hash": "9509a512bd279e27e1c1a4573a344b98e984e93521cef089eb3bb334",
9+
"stdout_hash": "4242c61474348c2a5f3f56b1ecc82284002826a13771b542875d6727",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0
Lines changed: 85 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,79 @@
11
(module
22
(type (;0;) (func (param i32) (result)))
33
(type (;1;) (func (param i32 i32 i32 i32) (result i32)))
4-
(type (;2;) (func (param i64) (result)))
5-
(type (;3;) (func (param f64) (result)))
4+
(type (;2;) (func (param) (result)))
5+
(type (;3;) (func (param) (result)))
66
(type (;4;) (func (param) (result)))
7-
(type (;5;) (func (param) (result)))
8-
(type (;6;) (func (param) (result)))
7+
(type (;5;) (func (param i64) (result)))
98
(import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0)))
109
(import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1)))
11-
(global $0 i32 (i32.const 0))
12-
(func $2 (type 2) (param i64) (result)
10+
(global $0 (mut i32) (i32.const 0))
11+
(global $1 (mut f32) (f32.const 0.000000))
12+
(global $2 (mut f64) (f64.const 0.000000))
13+
(func $2 (type 2) (param) (result)
14+
(local)
15+
call 3
16+
return
17+
)
18+
(func $3 (type 3) (param) (result)
19+
(local i32)
20+
i32.const 1
21+
i64.extend_i32_s
22+
call 5
23+
i32.const 1
24+
i32.const 16
25+
i32.const 1
26+
i32.const 0
27+
call 1
28+
drop
29+
i32.const 0
30+
i64.extend_i32_s
31+
call 5
32+
i32.const 1
33+
i32.const 16
34+
i32.const 1
35+
i32.const 0
36+
call 1
37+
drop
38+
i32.const 1
39+
local.set 0
40+
local.get 0
41+
i64.extend_i32_s
42+
call 5
43+
i32.const 1
44+
i32.const 16
45+
i32.const 1
46+
i32.const 0
47+
call 1
48+
drop
49+
i32.const 0
50+
local.set 0
51+
local.get 0
52+
i64.extend_i32_s
53+
call 5
54+
i32.const 1
55+
i32.const 16
56+
i32.const 1
57+
i32.const 0
58+
call 1
59+
drop
60+
return
61+
)
62+
(func $4 (type 4) (param) (result)
63+
(local)
64+
call 2
65+
i32.const 0
66+
call 0
67+
return
68+
)
69+
(func $5 (type 5) (param i64) (result)
1370
(local i64 i64 i64 i64)
1471
local.get 0
1572
i64.const 0
1673
i64.eq
1774
if
1875
i32.const 1
19-
i32.const 52
76+
i32.const 88
2077
i32.const 1
2178
i32.const 0
2279
call 1
@@ -98,7 +155,7 @@
98155
i64.rem_s
99156
i64.const 12
100157
i64.mul
101-
i64.const 52
158+
i64.const 88
102159
i64.add
103160
local.set 0
104161
i32.const 1
@@ -114,152 +171,12 @@
114171
end
115172
return
116173
)
117-
(func $3 (type 3) (param f64) (result)
118-
(local i64 i64 i64)
119-
local.get 0
120-
f64.const 0.000000
121-
f64.lt
122-
if
123-
i32.const 1
124-
i32.const 28
125-
i32.const 1
126-
i32.const 0
127-
call 1
128-
drop
129-
local.get 0
130-
f64.const -1.000000
131-
f64.mul
132-
local.set 0
133-
else
134-
end
135-
local.get 0
136-
i64.trunc_f64_s
137-
call 2
138-
i32.const 1
139-
i32.const 40
140-
i32.const 1
141-
i32.const 0
142-
call 1
143-
drop
144-
local.get 0
145-
local.get 0
146-
i64.trunc_f64_s
147-
f64.convert_i64_s
148-
f64.sub
149-
f64.const 100000000.000000
150-
f64.mul
151-
i64.trunc_f64_s
152-
local.set 2
153-
local.get 2
154-
local.set 3
155-
i64.const 0
156-
local.set 1
157-
loop
158-
local.get 2
159-
i64.const 0
160-
i64.gt_s
161-
if
162-
local.get 1
163-
i64.const 1
164-
i64.add
165-
local.set 1
166-
local.get 2
167-
f64.convert_i64_s
168-
i64.const 10
169-
f64.convert_i64_s
170-
f64.div
171-
i64.trunc_f64_s
172-
local.set 2
173-
br 1
174-
else
175-
end
176-
end
177-
loop
178-
local.get 1
179-
i64.const 8
180-
i64.lt_s
181-
if
182-
local.get 1
183-
i64.const 1
184-
i64.add
185-
local.set 1
186-
i32.const 1
187-
i32.const 52
188-
i32.const 1
189-
i32.const 0
190-
call 1
191-
drop
192-
br 1
193-
else
194-
end
195-
end
196-
local.get 3
197-
call 2
198-
return
199-
)
200-
(func $4 (type 4) (param) (result)
201-
(local)
202-
call 5
203-
return
204-
)
205-
(func $5 (type 5) (param) (result)
206-
(local i32)
207-
i32.const 1
208-
i64.extend_i32_s
209-
call 2
210-
i32.const 1
211-
i32.const 16
212-
i32.const 1
213-
i32.const 0
214-
call 1
215-
drop
216-
i32.const 0
217-
i64.extend_i32_s
218-
call 2
219-
i32.const 1
220-
i32.const 16
221-
i32.const 1
222-
i32.const 0
223-
call 1
224-
drop
225-
i32.const 1
226-
local.set 0
227-
local.get 0
228-
i64.extend_i32_s
229-
call 2
230-
i32.const 1
231-
i32.const 16
232-
i32.const 1
233-
i32.const 0
234-
call 1
235-
drop
236-
i32.const 0
237-
local.set 0
238-
local.get 0
239-
i64.extend_i32_s
240-
call 2
241-
i32.const 1
242-
i32.const 16
243-
i32.const 1
244-
i32.const 0
245-
call 1
246-
drop
247-
return
248-
)
249-
(func $6 (type 6) (param) (result)
250-
(local)
251-
call 4
252-
i32.const 0
253-
call 0
254-
return
255-
)
256174
(memory (;0;) 100 100)
257175
(export "memory" (memory 0))
258-
(export "print_i64" (func 2))
259-
(export "print_f64" (func 3))
260-
(export "_lpython_main_program" (func 4))
261-
(export "test_bool" (func 5))
262-
(export "_start" (func 6))
176+
(export "_lpython_main_program" (func 2))
177+
(export "test_bool" (func 3))
178+
(export "_start" (func 4))
179+
(export "print_i64" (func 5))
263180
(data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00")
264181
(data (;1;) (i32.const 12) " ")
265182
(data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00")
@@ -269,23 +186,29 @@
269186
(data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00")
270187
(data (;7;) (i32.const 48) ". ")
271188
(data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00")
272-
(data (;9;) (i32.const 60) "0 ")
189+
(data (;9;) (i32.const 60) "( ")
273190
(data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00")
274-
(data (;11;) (i32.const 72) "1 ")
191+
(data (;11;) (i32.const 72) ") ")
275192
(data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00")
276-
(data (;13;) (i32.const 84) "2 ")
193+
(data (;13;) (i32.const 84) ", ")
277194
(data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00")
278-
(data (;15;) (i32.const 96) "3 ")
195+
(data (;15;) (i32.const 96) "0 ")
279196
(data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00")
280-
(data (;17;) (i32.const 108) "4 ")
197+
(data (;17;) (i32.const 108) "1 ")
281198
(data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00")
282-
(data (;19;) (i32.const 120) "5 ")
199+
(data (;19;) (i32.const 120) "2 ")
283200
(data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00")
284-
(data (;21;) (i32.const 132) "6 ")
201+
(data (;21;) (i32.const 132) "3 ")
285202
(data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00")
286-
(data (;23;) (i32.const 144) "7 ")
203+
(data (;23;) (i32.const 144) "4 ")
287204
(data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00")
288-
(data (;25;) (i32.const 156) "8 ")
205+
(data (;25;) (i32.const 156) "5 ")
289206
(data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00")
290-
(data (;27;) (i32.const 168) "9 ")
207+
(data (;27;) (i32.const 168) "6 ")
208+
(data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00")
209+
(data (;29;) (i32.const 180) "7 ")
210+
(data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00")
211+
(data (;31;) (i32.const 192) "8 ")
212+
(data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00")
213+
(data (;33;) (i32.const 204) "9 ")
291214
)

tests/reference/wat-expr14-5e0cb96.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": "wat-expr14-5e0cb96.stdout",
9-
"stdout_hash": "96f90f190be31d02b145de3fe293bc74b4a79a3a8aa4c8ebb236a4e9",
9+
"stdout_hash": "95bfdfb006fa1e8d273e861935d577d05178fcb4d57958b72489476d",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

0 commit comments

Comments
 (0)