Skip to content

Commit 4dd3bff

Browse files
committed
TEST: Update reference tests
1 parent 611d856 commit 4dd3bff

14 files changed

+946
-202
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": "177061f88c73ba4d5287a48c12cfb3c0b29050dc1307bf820fd43cd8",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/wat-bool1-234bcd1.stdout

Lines changed: 149 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,30 @@
33
(type (;1;) (func (param i32 i32 i32 i32) (result i32)))
44
(type (;2;) (func (param i64) (result)))
55
(type (;3;) (func (param f64) (result)))
6-
(type (;4;) (func (param) (result)))
7-
(type (;5;) (func (param) (result)))
8-
(type (;6;) (func (param) (result)))
6+
(type (;4;) (func (param f32 f32 f32 f32) (result f32 f32)))
7+
(type (;5;) (func (param f64 f64 f64 f64) (result f64 f64)))
8+
(type (;6;) (func (param f32 f32 f32 f32) (result f32 f32)))
9+
(type (;7;) (func (param f64 f64 f64 f64) (result f64 f64)))
10+
(type (;8;) (func (param f32 f32 f32 f32) (result f32 f32)))
11+
(type (;9;) (func (param f64 f64 f64 f64) (result f64 f64)))
12+
(type (;10;) (func (param f32 f32) (result f32)))
13+
(type (;11;) (func (param f64 f64) (result f64)))
14+
(type (;12;) (func (param) (result)))
15+
(type (;13;) (func (param) (result)))
16+
(type (;14;) (func (param) (result)))
917
(import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0)))
1018
(import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1)))
11-
(global $0 i32 (i32.const 0))
19+
(global $0 (mut i32) (i32.const 0))
20+
(global $1 (mut f32) (f32.const 0.000000))
21+
(global $2 (mut f64) (f64.const 0.000000))
1222
(func $2 (type 2) (param i64) (result)
1323
(local i64 i64 i64 i64)
1424
local.get 0
1525
i64.const 0
1626
i64.eq
1727
if
1828
i32.const 1
19-
i32.const 52
29+
i32.const 88
2030
i32.const 1
2131
i32.const 0
2232
call 1
@@ -98,7 +108,7 @@
98108
i64.rem_s
99109
i64.const 12
100110
i64.mul
101-
i64.const 52
111+
i64.const 88
102112
i64.add
103113
local.set 0
104114
i32.const 1
@@ -184,7 +194,7 @@
184194
i64.add
185195
local.set 1
186196
i32.const 1
187-
i32.const 52
197+
i32.const 88
188198
i32.const 1
189199
i32.const 0
190200
call 1
@@ -197,12 +207,112 @@
197207
call 2
198208
return
199209
)
200-
(func $4 (type 4) (param) (result)
210+
(func $4 (type 4) (param f32 f32 f32 f32) (result f32 f32)
201211
(local)
202-
call 5
212+
local.get 0
213+
local.get 2
214+
f32.add
215+
local.get 1
216+
local.get 3
217+
f32.add
218+
return
219+
)
220+
(func $5 (type 5) (param f64 f64 f64 f64) (result f64 f64)
221+
(local)
222+
local.get 0
223+
local.get 2
224+
f64.add
225+
local.get 1
226+
local.get 3
227+
f64.add
228+
return
229+
)
230+
(func $6 (type 6) (param f32 f32 f32 f32) (result f32 f32)
231+
(local)
232+
local.get 0
233+
local.get 2
234+
f32.sub
235+
local.get 1
236+
local.get 3
237+
f32.sub
238+
return
239+
)
240+
(func $7 (type 7) (param f64 f64 f64 f64) (result f64 f64)
241+
(local)
242+
local.get 0
243+
local.get 2
244+
f64.sub
245+
local.get 1
246+
local.get 3
247+
f64.sub
248+
return
249+
)
250+
(func $8 (type 8) (param f32 f32 f32 f32) (result f32 f32)
251+
(local)
252+
local.get 0
253+
local.get 2
254+
f32.mul
255+
local.get 1
256+
local.get 3
257+
f32.mul
258+
f32.sub
259+
local.get 0
260+
local.get 3
261+
f32.mul
262+
local.get 1
263+
local.get 2
264+
f32.mul
265+
f32.add
266+
return
267+
)
268+
(func $9 (type 9) (param f64 f64 f64 f64) (result f64 f64)
269+
(local)
270+
local.get 0
271+
local.get 2
272+
f64.mul
273+
local.get 1
274+
local.get 3
275+
f64.mul
276+
f64.sub
277+
local.get 0
278+
local.get 3
279+
f64.mul
280+
local.get 1
281+
local.get 2
282+
f64.mul
283+
f64.add
284+
return
285+
)
286+
(func $10 (type 10) (param f32 f32) (result f32)
287+
(local)
288+
local.get 0
289+
local.get 0
290+
f32.mul
291+
local.get 1
292+
local.get 1
293+
f32.mul
294+
f32.add
295+
f32.sqrt
296+
return
297+
)
298+
(func $11 (type 11) (param f64 f64) (result f64)
299+
(local)
300+
local.get 0
301+
local.get 0
302+
f64.mul
303+
local.get 1
304+
local.get 1
305+
f64.mul
306+
f64.add
307+
f64.sqrt
308+
return
309+
)
310+
(func $12 (type 12) (param) (result)
311+
(local)
312+
call 13
203313
return
204314
)
205-
(func $5 (type 5) (param) (result)
315+
(func $13 (type 13) (param) (result)
206316
(local i32)
207317
i32.const 1
208318
i64.extend_i32_s
@@ -246,9 +356,9 @@
246356
drop
247357
return
248358
)
249-
(func $6 (type 6) (param) (result)
359+
(func $14 (type 14) (param) (result)
250360
(local)
251-
call 4
361+
call 12
252362
i32.const 0
253363
call 0
254364
return
@@ -257,9 +367,17 @@
257367
(export "memory" (memory 0))
258368
(export "print_i64" (func 2))
259369
(export "print_f64" (func 3))
260-
(export "_lpython_main_program" (func 4))
261-
(export "test_bool" (func 5))
262-
(export "_start" (func 6))
370+
(export "add_c32" (func 4))
371+
(export "add_c64" (func 5))
372+
(export "sub_c32" (func 6))
373+
(export "sub_c64" (func 7))
374+
(export "mul_c32" (func 8))
375+
(export "mul_c64" (func 9))
376+
(export "abs_c32" (func 10))
377+
(export "abs_c64" (func 11))
378+
(export "_lpython_main_program" (func 12))
379+
(export "test_bool" (func 13))
380+
(export "_start" (func 14))
263381
(data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00")
264382
(data (;1;) (i32.const 12) " ")
265383
(data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00")
@@ -269,23 +387,29 @@
269387
(data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00")
270388
(data (;7;) (i32.const 48) ". ")
271389
(data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00")
272-
(data (;9;) (i32.const 60) "0 ")
390+
(data (;9;) (i32.const 60) "( ")
273391
(data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00")
274-
(data (;11;) (i32.const 72) "1 ")
392+
(data (;11;) (i32.const 72) ") ")
275393
(data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00")
276-
(data (;13;) (i32.const 84) "2 ")
394+
(data (;13;) (i32.const 84) ", ")
277395
(data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00")
278-
(data (;15;) (i32.const 96) "3 ")
396+
(data (;15;) (i32.const 96) "0 ")
279397
(data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00")
280-
(data (;17;) (i32.const 108) "4 ")
398+
(data (;17;) (i32.const 108) "1 ")
281399
(data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00")
282-
(data (;19;) (i32.const 120) "5 ")
400+
(data (;19;) (i32.const 120) "2 ")
283401
(data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00")
284-
(data (;21;) (i32.const 132) "6 ")
402+
(data (;21;) (i32.const 132) "3 ")
285403
(data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00")
286-
(data (;23;) (i32.const 144) "7 ")
404+
(data (;23;) (i32.const 144) "4 ")
287405
(data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00")
288-
(data (;25;) (i32.const 156) "8 ")
406+
(data (;25;) (i32.const 156) "5 ")
289407
(data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00")
290-
(data (;27;) (i32.const 168) "9 ")
408+
(data (;27;) (i32.const 168) "6 ")
409+
(data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00")
410+
(data (;29;) (i32.const 180) "7 ")
411+
(data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00")
412+
(data (;31;) (i32.const 192) "8 ")
413+
(data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00")
414+
(data (;33;) (i32.const 204) "9 ")
291415
)

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": "5c80c151c3115eef3cfd1144325ccc560216986ad23494ace1e78695",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

0 commit comments

Comments
 (0)