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

Skip to content

Commit d0b31d5

Browse files
committed
TEST: Update reference tests
1 parent a3151c6 commit d0b31d5

28 files changed

+1047
-45
lines changed

tests/reference/asr-array_01_decl-39cf894.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-array_01_decl-39cf894.stdout",
9-
"stdout_hash": "b45d33de49ca7e90f8327f100d88a858c8449acf8d8fa2bc527b346f",
9+
"stdout_hash": "137a0c427925ba7da2e7151f2cf52bfa9a64fede11fe8d2653f20b64",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-array_01_decl-39cf894.stdout

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,105 @@
779779
accept_f32_array
780780
accept_f64_array]
781781
[]
782-
[(Print
782+
[(=
783+
(Var 206 ai16)
784+
(ArrayConstant
785+
[]
786+
(Array
787+
(Integer 2)
788+
[((IntegerConstant 0 (Integer 4))
789+
(IntegerConstant 3 (Integer 4)))]
790+
FixedSizeArray
791+
)
792+
RowMajor
793+
)
794+
()
795+
)
796+
(=
797+
(Var 206 ai32)
798+
(ArrayConstant
799+
[]
800+
(Array
801+
(Integer 4)
802+
[((IntegerConstant 0 (Integer 4))
803+
(IntegerConstant 3 (Integer 4)))]
804+
FixedSizeArray
805+
)
806+
RowMajor
807+
)
808+
()
809+
)
810+
(=
811+
(Var 206 ai64)
812+
(ArrayConstant
813+
[]
814+
(Array
815+
(Integer 8)
816+
[((IntegerConstant 0 (Integer 4))
817+
(IntegerConstant 10 (Integer 4)))]
818+
FixedSizeArray
819+
)
820+
RowMajor
821+
)
822+
()
823+
)
824+
(=
825+
(Var 206 af32)
826+
(ArrayConstant
827+
[]
828+
(Array
829+
(Real 4)
830+
[((IntegerConstant 0 (Integer 4))
831+
(IntegerConstant 3 (Integer 4)))]
832+
FixedSizeArray
833+
)
834+
RowMajor
835+
)
836+
()
837+
)
838+
(=
839+
(Var 206 af64)
840+
(ArrayConstant
841+
[]
842+
(Array
843+
(Real 8)
844+
[((IntegerConstant 0 (Integer 4))
845+
(IntegerConstant 10 (Integer 4)))]
846+
FixedSizeArray
847+
)
848+
RowMajor
849+
)
850+
()
851+
)
852+
(=
853+
(Var 206 ac32)
854+
(ArrayConstant
855+
[]
856+
(Array
857+
(Complex 4)
858+
[((IntegerConstant 0 (Integer 4))
859+
(IntegerConstant 3 (Integer 4)))]
860+
FixedSizeArray
861+
)
862+
RowMajor
863+
)
864+
()
865+
)
866+
(=
867+
(Var 206 ac64)
868+
(ArrayConstant
869+
[]
870+
(Array
871+
(Complex 8)
872+
[((IntegerConstant 0 (Integer 4))
873+
(IntegerConstant 10 (Integer 4)))]
874+
FixedSizeArray
875+
)
876+
RowMajor
877+
)
878+
()
879+
)
880+
(Print
783881
()
784882
[(FunctionCall
785883
2 accept_i16_array

tests/reference/asr-array_02_decl-e8f6874.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"basename": "asr-array_02_decl-e8f6874",
33
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
44
"infile": "tests/../integration_tests/array_02_decl.py",
5-
"infile_hash": "8daa77dd2d5fe6c6f5f3ce867746c5e13290305ef7e1723ac9669285",
5+
"infile_hash": "9a398864499c7a3b4e2a480faf3a5dccaa65f9771a8de27f55f11ca4",
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-array_02_decl-e8f6874.stdout",
9-
"stdout_hash": "40e73d0d895210f7571f8a31ef8d426401f5cb57819271790fb4f7d6",
9+
"stdout_hash": "6d98d2f4ac58c6ca1bc2b750ba97877dc53c41604be606b931fee5b5",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-array_02_decl-e8f6874.stdout

Lines changed: 103 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,109 @@
581581
accept_multidim_f32_array
582582
accept_multidim_f64_array]
583583
[]
584-
[(Print
584+
[(=
585+
(Var 204 ai32)
586+
(ArrayConstant
587+
[]
588+
(Array
589+
(Integer 4)
590+
[((IntegerConstant 0 (Integer 4))
591+
(IntegerConstant 3 (Integer 4)))
592+
((IntegerConstant 0 (Integer 4))
593+
(IntegerConstant 3 (Integer 4)))]
594+
FixedSizeArray
595+
)
596+
RowMajor
597+
)
598+
()
599+
)
600+
(=
601+
(Var 204 ai64)
602+
(ArrayConstant
603+
[]
604+
(Array
605+
(Integer 8)
606+
[((IntegerConstant 0 (Integer 4))
607+
(IntegerConstant 10 (Integer 4)))
608+
((IntegerConstant 0 (Integer 4))
609+
(IntegerConstant 10 (Integer 4)))
610+
((IntegerConstant 0 (Integer 4))
611+
(IntegerConstant 10 (Integer 4)))]
612+
FixedSizeArray
613+
)
614+
RowMajor
615+
)
616+
()
617+
)
618+
(=
619+
(Var 204 af32)
620+
(ArrayConstant
621+
[]
622+
(Array
623+
(Real 4)
624+
[((IntegerConstant 0 (Integer 4))
625+
(IntegerConstant 3 (Integer 4)))]
626+
FixedSizeArray
627+
)
628+
RowMajor
629+
)
630+
()
631+
)
632+
(=
633+
(Var 204 af64)
634+
(ArrayConstant
635+
[]
636+
(Array
637+
(Real 8)
638+
[((IntegerConstant 0 (Integer 4))
639+
(IntegerConstant 10 (Integer 4)))
640+
((IntegerConstant 0 (Integer 4))
641+
(IntegerConstant 4 (Integer 4)))]
642+
FixedSizeArray
643+
)
644+
RowMajor
645+
)
646+
()
647+
)
648+
(=
649+
(Var 204 ac32)
650+
(ArrayConstant
651+
[]
652+
(Array
653+
(Complex 4)
654+
[((IntegerConstant 0 (Integer 4))
655+
(IntegerConstant 3 (Integer 4)))
656+
((IntegerConstant 0 (Integer 4))
657+
(IntegerConstant 5 (Integer 4)))
658+
((IntegerConstant 0 (Integer 4))
659+
(IntegerConstant 99 (Integer 4)))]
660+
FixedSizeArray
661+
)
662+
RowMajor
663+
)
664+
()
665+
)
666+
(=
667+
(Var 204 ac64)
668+
(ArrayConstant
669+
[]
670+
(Array
671+
(Complex 8)
672+
[((IntegerConstant 0 (Integer 4))
673+
(IntegerConstant 10 (Integer 4)))
674+
((IntegerConstant 0 (Integer 4))
675+
(IntegerConstant 13 (Integer 4)))
676+
((IntegerConstant 0 (Integer 4))
677+
(IntegerConstant 11 (Integer 4)))
678+
((IntegerConstant 0 (Integer 4))
679+
(IntegerConstant 16 (Integer 4)))]
680+
FixedSizeArray
681+
)
682+
RowMajor
683+
)
684+
()
685+
)
686+
(Print
585687
()
586688
[(FunctionCall
587689
2 accept_multidim_i32_array

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": "e7c1aac9ae8d0cc269135f3d79b99fbda0574b09d8d7d20bced754ec",
9+
"stdout_hash": "26ddb69777a0721425e5264d3958b187bc23290470d872b10f7b341a",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-bindc_02-bc1a7ea.stdout

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,20 @@
164164
)
165165
()
166166
)
167+
(=
168+
(Var 200 y)
169+
(ArrayConstant
170+
[]
171+
(Array
172+
(Integer 2)
173+
[((IntegerConstant 0 (Integer 4))
174+
(IntegerConstant 2 (Integer 4)))]
175+
FixedSizeArray
176+
)
177+
RowMajor
178+
)
179+
()
180+
)
167181
(=
168182
(ArrayItem
169183
(Var 200 y)

tests/reference/asr-bindc_04-06bd800.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"basename": "asr-bindc_04-06bd800",
33
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
44
"infile": "tests/errors/bindc_04.py",
5-
"infile_hash": "cf66037fcd7e8cfdd63dc5800b73e5c398afda99cf83ed51a6e70c51",
5+
"infile_hash": "009fad63ac85061e603f011869c2439b67409edcf8cc633d1fde9013",
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": null,
99
"stdout_hash": null,
1010
"stderr": "asr-bindc_04-06bd800.stderr",
11-
"stderr_hash": "3468ddf2bd723ff316c68d930a74ca8cad2dc3b4458bee1028752848",
11+
"stderr_hash": "20c105d0189cd06a197a6b1dda073a58f5c8ee0104230cf187960c46",
1212
"returncode": 2
1313
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
semantic error: Only those local variables which can be reduced to compile time constant should be used in dimensions of an array.
22
--> tests/errors/bindc_04.py:20:12
33
|
4-
20 | C: i16[nk] = empty(nk, dtype=int32)
4+
20 | C: i16[nk] = empty(nk, dtype=int16)
55
| ^^

tests/reference/asr-cast-435c233.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-cast-435c233.stdout",
9-
"stdout_hash": "fe198b3570faed74e1d6babc91b93c715f90a21cf5e19b40351e3299",
9+
"stdout_hash": "601d0fda929bc1ee47ec591680476f69f32af980624d2fd504094091",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-cast-435c233.stdout

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,40 @@
185185
)
186186
()
187187
)
188+
(=
189+
(Var 3 x)
190+
(ListConstant
191+
[]
192+
(List
193+
(Character 1 -2 ())
194+
)
195+
)
196+
()
197+
)
198+
(=
199+
(Var 3 x)
200+
(FunctionCall
201+
3 list
202+
()
203+
[((ListConstant
204+
[]
205+
(List
206+
(Character 1 -2 ())
207+
)
208+
))]
209+
(List
210+
(Character 1 -2 ())
211+
)
212+
(ListConstant
213+
[]
214+
(List
215+
(Character 1 -2 ())
216+
)
217+
)
218+
()
219+
)
220+
()
221+
)
188222
(=
189223
(Var 3 x)
190224
(FunctionCall

tests/reference/asr-elemental_01-b58df26.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"basename": "asr-elemental_01-b58df26",
33
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
44
"infile": "tests/../integration_tests/elemental_01.py",
5-
"infile_hash": "52f31862d51b5fa967b8eafbaf9335d38a6ba9a480d9ea4cda212ace",
5+
"infile_hash": "1d1eb8ce26df5817c1e474e4f69b0b96e53df362a31f1b722efaadf0",
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-elemental_01-b58df26.stdout",
9-
"stdout_hash": "6fd3b9bf7ded59e56672127135e71ffe94a3e2715eb5ae6c1d77ea82",
9+
"stdout_hash": "4b612dbd2c85f1c034649fea72db6f24742e86f41b5fef2d6924125b",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

0 commit comments

Comments
 (0)