Skip to content

Commit

Permalink
TEST: Update reference tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed Aug 28, 2023
1 parent cf3ea81 commit d5f5dd0
Show file tree
Hide file tree
Showing 36 changed files with 1,056 additions and 54 deletions.
2 changes: 1 addition & 1 deletion tests/reference/asr-array_01_decl-39cf894.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outfile": null,
"outfile_hash": null,
"stdout": "asr-array_01_decl-39cf894.stdout",
"stdout_hash": "b45d33de49ca7e90f8327f100d88a858c8449acf8d8fa2bc527b346f",
"stdout_hash": "137a0c427925ba7da2e7151f2cf52bfa9a64fede11fe8d2653f20b64",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
100 changes: 99 additions & 1 deletion tests/reference/asr-array_01_decl-39cf894.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,105 @@
accept_f32_array
accept_f64_array]
[]
[(Print
[(=
(Var 206 ai16)
(ArrayConstant
[]
(Array
(Integer 2)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(=
(Var 206 ai32)
(ArrayConstant
[]
(Array
(Integer 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(=
(Var 206 ai64)
(ArrayConstant
[]
(Array
(Integer 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(=
(Var 206 af32)
(ArrayConstant
[]
(Array
(Real 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(=
(Var 206 af64)
(ArrayConstant
[]
(Array
(Real 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(=
(Var 206 ac32)
(ArrayConstant
[]
(Array
(Complex 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(=
(Var 206 ac64)
(ArrayConstant
[]
(Array
(Complex 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(Print
()
[(FunctionCall
2 accept_i16_array
Expand Down
4 changes: 2 additions & 2 deletions tests/reference/asr-array_02_decl-e8f6874.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"basename": "asr-array_02_decl-e8f6874",
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/../integration_tests/array_02_decl.py",
"infile_hash": "8daa77dd2d5fe6c6f5f3ce867746c5e13290305ef7e1723ac9669285",
"infile_hash": "9a398864499c7a3b4e2a480faf3a5dccaa65f9771a8de27f55f11ca4",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-array_02_decl-e8f6874.stdout",
"stdout_hash": "40e73d0d895210f7571f8a31ef8d426401f5cb57819271790fb4f7d6",
"stdout_hash": "6d98d2f4ac58c6ca1bc2b750ba97877dc53c41604be606b931fee5b5",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
104 changes: 103 additions & 1 deletion tests/reference/asr-array_02_decl-e8f6874.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,109 @@
accept_multidim_f32_array
accept_multidim_f64_array]
[]
[(Print
[(=
(Var 204 ai32)
(ArrayConstant
[]
(Array
(Integer 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))
((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(=
(Var 204 ai64)
(ArrayConstant
[]
(Array
(Integer 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))
((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))
((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(=
(Var 204 af32)
(ArrayConstant
[]
(Array
(Real 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(=
(Var 204 af64)
(ArrayConstant
[]
(Array
(Real 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))
((IntegerConstant 0 (Integer 4))
(IntegerConstant 4 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(=
(Var 204 ac32)
(ArrayConstant
[]
(Array
(Complex 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))
((IntegerConstant 0 (Integer 4))
(IntegerConstant 5 (Integer 4)))
((IntegerConstant 0 (Integer 4))
(IntegerConstant 99 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(=
(Var 204 ac64)
(ArrayConstant
[]
(Array
(Complex 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))
((IntegerConstant 0 (Integer 4))
(IntegerConstant 13 (Integer 4)))
((IntegerConstant 0 (Integer 4))
(IntegerConstant 11 (Integer 4)))
((IntegerConstant 0 (Integer 4))
(IntegerConstant 16 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(Print
()
[(FunctionCall
2 accept_multidim_i32_array
Expand Down
2 changes: 1 addition & 1 deletion tests/reference/asr-arrays_01-a617b64.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"stdout": null,
"stdout_hash": null,
"stderr": "asr-arrays_01-a617b64.stderr",
"stderr_hash": "b8317c7306f747ceefa8557c06f2a0b4a8a4bd7ae805bb494fca6ef2",
"stderr_hash": "809385fe99a784ef963b610dee85f55ae57dd5f41b45e094b2d8eeed",
"returncode": 2
}
4 changes: 2 additions & 2 deletions tests/reference/asr-arrays_01-a617b64.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ semantic error: Type mismatch in procedure call; the types must be compatible
--> tests/errors/arrays_01.py:15:9
|
15 | [i8(214), i8(157), i8(3), i8(146)])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch (passed argument type is list[i8] but required type is i8[4])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch (passed argument type is list[i8] but required type is i8[0,4])
|
9 | a : i8[4] = empty(4, dtype=int8)
| ^^^^^ type mismatch (passed argument type is list[i8] but required type is i8[4])
| ^^^^^ type mismatch (passed argument type is list[i8] but required type is i8[0,4])
2 changes: 1 addition & 1 deletion tests/reference/asr-bindc_02-bc1a7ea.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outfile": null,
"outfile_hash": null,
"stdout": "asr-bindc_02-bc1a7ea.stdout",
"stdout_hash": "e7c1aac9ae8d0cc269135f3d79b99fbda0574b09d8d7d20bced754ec",
"stdout_hash": "26ddb69777a0721425e5264d3958b187bc23290470d872b10f7b341a",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
14 changes: 14 additions & 0 deletions tests/reference/asr-bindc_02-bc1a7ea.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,20 @@
)
()
)
(=
(Var 200 y)
(ArrayConstant
[]
(Array
(Integer 2)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 2 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(=
(ArrayItem
(Var 200 y)
Expand Down
4 changes: 2 additions & 2 deletions tests/reference/asr-bindc_04-06bd800.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"basename": "asr-bindc_04-06bd800",
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/errors/bindc_04.py",
"infile_hash": "cf66037fcd7e8cfdd63dc5800b73e5c398afda99cf83ed51a6e70c51",
"infile_hash": "009fad63ac85061e603f011869c2439b67409edcf8cc633d1fde9013",
"outfile": null,
"outfile_hash": null,
"stdout": null,
"stdout_hash": null,
"stderr": "asr-bindc_04-06bd800.stderr",
"stderr_hash": "3468ddf2bd723ff316c68d930a74ca8cad2dc3b4458bee1028752848",
"stderr_hash": "20c105d0189cd06a197a6b1dda073a58f5c8ee0104230cf187960c46",
"returncode": 2
}
2 changes: 1 addition & 1 deletion tests/reference/asr-bindc_04-06bd800.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
semantic error: Only those local variables which can be reduced to compile time constant should be used in dimensions of an array.
--> tests/errors/bindc_04.py:20:12
|
20 | C: i16[nk] = empty(nk, dtype=int32)
20 | C: i16[nk] = empty(nk, dtype=int16)
| ^^
2 changes: 1 addition & 1 deletion tests/reference/asr-cast-435c233.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outfile": null,
"outfile_hash": null,
"stdout": "asr-cast-435c233.stdout",
"stdout_hash": "fe198b3570faed74e1d6babc91b93c715f90a21cf5e19b40351e3299",
"stdout_hash": "601d0fda929bc1ee47ec591680476f69f32af980624d2fd504094091",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
34 changes: 34 additions & 0 deletions tests/reference/asr-cast-435c233.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,40 @@
)
()
)
(=
(Var 3 x)
(ListConstant
[]
(List
(Character 1 -2 ())
)
)
()
)
(=
(Var 3 x)
(FunctionCall
3 list
()
[((ListConstant
[]
(List
(Character 1 -2 ())
)
))]
(List
(Character 1 -2 ())
)
(ListConstant
[]
(List
(Character 1 -2 ())
)
)
()
)
()
)
(=
(Var 3 x)
(FunctionCall
Expand Down
4 changes: 2 additions & 2 deletions tests/reference/asr-elemental_01-b58df26.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"basename": "asr-elemental_01-b58df26",
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/../integration_tests/elemental_01.py",
"infile_hash": "52f31862d51b5fa967b8eafbaf9335d38a6ba9a480d9ea4cda212ace",
"infile_hash": "1d1eb8ce26df5817c1e474e4f69b0b96e53df362a31f1b722efaadf0",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-elemental_01-b58df26.stdout",
"stdout_hash": "6fd3b9bf7ded59e56672127135e71ffe94a3e2715eb5ae6c1d77ea82",
"stdout_hash": "4b612dbd2c85f1c034649fea72db6f24742e86f41b5fef2d6924125b",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
Loading

0 comments on commit d5f5dd0

Please sign in to comment.