Skip to content

Commit e10fd99

Browse files
committed
Updated reference tests
1 parent 33c5bd8 commit e10fd99

17 files changed

+85
-47
lines changed

integration_tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ RUN(NAME enum_06 LABELS cpython llvm c)
723723
RUN(NAME enum_07 IMPORT_PATH ..
724724
LABELS cpython llvm c)
725725
RUN(NAME union_01 LABELS cpython llvm c)
726-
RUN(NAME union_02 LABELS cpython llvm c)
726+
RUN(NAME union_02 LABELS cpython llvm c NOFAST)
727727
RUN(NAME union_03 LABELS cpython llvm c)
728728
RUN(NAME union_04 IMPORT_PATH ..
729729
LABELS cpython llvm c)

tests/reference/asr-generics_01-d616074.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-generics_01-d616074.stdout",
9-
"stdout_hash": "dfabe5a70a7f43494584ff8aeda7b7c86ed518fae456658f1f534daf",
9+
"stdout_hash": "a86dbbc3855a11fac0c305599cd98e368c31b0fc172e78dfc1fe484b",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-generics_01-d616074.stdout

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
.false.
9393
.false.
9494
.false.
95-
[]
95+
[2 add]
9696
.false.
9797
)
9898
[add_integer]
@@ -185,7 +185,7 @@
185185
.false.
186186
.false.
187187
.false.
188-
[]
188+
[2 add]
189189
.false.
190190
)
191191
[add_string]

tests/reference/asr-generics_array_02-22c8dc1.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-generics_array_02-22c8dc1.stdout",
9-
"stdout_hash": "2132824b968d01dc0f0c0943bbdeb17e3c6a04caf2775065a397e1b2",
9+
"stdout_hash": "d128fe83fd89823c14327513eda9881dd56fb771acc0f0962cf42163",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-generics_array_02-22c8dc1.stdout

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
.false.
159159
.false.
160160
.false.
161-
[]
161+
[2 add]
162162
.false.
163163
)
164164
[add_integer]
@@ -170,9 +170,7 @@
170170
(ArrayConstant
171171
[]
172172
(Array
173-
(TypeParameter
174-
T
175-
)
173+
(Integer 4)
176174
[((IntegerConstant 0 (Integer 4))
177175
(Var 206 n))]
178176
PointerToDataArray
@@ -384,7 +382,7 @@
384382
.false.
385383
.false.
386384
.false.
387-
[]
385+
[2 add]
388386
.false.
389387
)
390388
[add_float]
@@ -396,9 +394,7 @@
396394
(ArrayConstant
397395
[]
398396
(Array
399-
(TypeParameter
400-
T
401-
)
397+
(Real 4)
402398
[((IntegerConstant 0 (Integer 4))
403399
(Var 207 n))]
404400
PointerToDataArray

tests/reference/asr-generics_array_03-fb3706c.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-generics_array_03-fb3706c.stdout",
9-
"stdout_hash": "34635ce31c2595c83083daa522e86fa0b4fa7e1b9916dfa49808583f",
9+
"stdout_hash": "871f0e298031815ca0a9988f6bae910350bec1f086c07179d67056f8",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-generics_array_03-fb3706c.stdout

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
.false.
252252
.false.
253253
.false.
254-
[]
254+
[2 add]
255255
.false.
256256
)
257257
[add_integer]
@@ -264,9 +264,7 @@
264264
(ArrayConstant
265265
[]
266266
(Array
267-
(TypeParameter
268-
T
269-
)
267+
(Integer 4)
270268
[((IntegerConstant 0 (Integer 4))
271269
(Var 207 n))
272270
((IntegerConstant 0 (Integer 4))
@@ -598,7 +596,7 @@
598596
.false.
599597
.false.
600598
.false.
601-
[]
599+
[2 add]
602600
.false.
603601
)
604602
[add_float]
@@ -611,9 +609,7 @@
611609
(ArrayConstant
612610
[]
613611
(Array
614-
(TypeParameter
615-
T
616-
)
612+
(Real 4)
617613
[((IntegerConstant 0 (Integer 4))
618614
(Var 208 n))
619615
((IntegerConstant 0 (Integer 4))

tests/reference/asr-generics_list_01-39c4044.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-generics_list_01-39c4044.stdout",
9-
"stdout_hash": "d53f6f826430b0aa861db8f7932cdd9f24d61cddb7527ad97b61b595",
9+
"stdout_hash": "1b67e64b1337c59fb1f94f0afe307382c49ce404d59e61fc657c5225",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-generics_list_01-39c4044.stdout

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@
127127
.false.
128128
.false.
129129
.false.
130-
[]
130+
[2 zero
131+
2 add
132+
2 div]
131133
.false.
132134
)
133135
[empty_integer
@@ -332,7 +334,9 @@
332334
.false.
333335
.false.
334336
.false.
335-
[]
337+
[2 zero
338+
2 add
339+
2 div]
336340
.false.
337341
)
338342
[empty_float
@@ -537,7 +541,9 @@
537541
.false.
538542
.false.
539543
.false.
540-
[]
544+
[2 zero
545+
2 add
546+
2 div]
541547
.false.
542548
)
543549
[empty_string

tests/reference/c-expr7-bb2692a.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": "c-expr7-bb2692a.stdout",
9-
"stdout_hash": "241378f1e16504e72b5ed9ad7fc0fa88ecfafb0373b545bf381a9397",
9+
"stdout_hash": "92e36dc1146bef152cab7c8086ce6de203a3d966dc5415331bd27257",
1010
"stderr": "c-expr7-bb2692a.stderr",
1111
"stderr_hash": "6e9790ac88db1a9ead8f64a91ba8a6605de67167037908a74b77be0c",
1212
"returncode": 0

tests/reference/c-expr7-bb2692a.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ double _lfortran_zaimag(double_complex_t x);
3030
void test_pow()
3131
{
3232
int32_t a;
33-
a = (int32_t)(__lpython_overloaded_0__pow(2, 2));
33+
a = (int32_t)( 4.00000000000000000e+00);
3434
}
3535

3636
int32_t test_pow_1(int32_t a, int32_t b)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"basename": "llvm-structs_11-09fea6a",
3+
"cmd": "lpython --no-color --show-llvm {infile} -o {outfile}",
4+
"infile": "tests/structs_11.py",
5+
"infile_hash": "9cb6c80ad837ba66472a91b22e9068ec439b6a2a179a452d90d84c78",
6+
"outfile": null,
7+
"outfile_hash": null,
8+
"stdout": "llvm-structs_11-09fea6a.stdout",
9+
"stdout_hash": "c6cdeacf6cdb7b9a5e68d2263a28585e68ec51e11f544fd366eac428",
10+
"stderr": null,
11+
"stderr_hash": null,
12+
"returncode": 0
13+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
; ModuleID = 'LFortran'
2+
source_filename = "LFortran"
3+
4+
%Bar = type { %Foo }
5+
%Foo = type { i32 }
6+
7+
@bar = global %Bar zeroinitializer
8+
@0 = private unnamed_addr constant [2 x i8] c" \00", align 1
9+
@1 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
10+
@2 = private unnamed_addr constant [5 x i8] c"%d%s\00", align 1
11+
@3 = private unnamed_addr constant [2 x i8] c" \00", align 1
12+
@4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
13+
@5 = private unnamed_addr constant [5 x i8] c"%d%s\00", align 1
14+
15+
define void @__module___main_____main__global_init() {
16+
.entry:
17+
br label %return
18+
19+
return: ; preds = %.entry
20+
ret void
21+
}
22+
23+
define void @__module___main_____main__global_stmts() {
24+
.entry:
25+
%0 = load i32, i32* getelementptr inbounds (%Bar, %Bar* @bar, i32 0, i32 0, i32 0), align 4
26+
call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @2, i32 0, i32 0), i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @1, i32 0, i32 0))
27+
%1 = load i32, i32* getelementptr inbounds (%Bar, %Bar* @bar, i32 0, i32 0, i32 0), align 4
28+
call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0))
29+
br label %return
30+
31+
return: ; preds = %.entry
32+
ret void
33+
}
34+
35+
declare void @_lfortran_printf(i8*, ...)
36+
37+
define i32 @main(i32 %0, i8** %1) {
38+
.entry:
39+
call void @_lpython_set_argv(i32 %0, i8** %1)
40+
call void @__module___main_____main__global_init()
41+
call void @__module___main_____main__global_stmts()
42+
ret i32 0
43+
}
44+
45+
declare void @_lpython_set_argv(i32, i8**)

tests/reference/llvm-structs_11-a746e1b.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/reference/llvm-structs_11-a746e1b.stderr

Lines changed: 0 additions & 5 deletions
This file was deleted.
File renamed without changes.

tests/tests.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ filename = "errors/structs_10.py"
747747
asr = true
748748

749749
[[test]]
750-
filename = "errors/structs_11.py"
750+
filename = "structs_11.py"
751751
llvm = true
752752

753753
[[test]]

0 commit comments

Comments
 (0)