Skip to content

Commit

Permalink
TEST: Updated reference tests
Browse files Browse the repository at this point in the history
  • Loading branch information
czgdp1807 committed Dec 20, 2023
1 parent 2f7f5da commit 12d6345
Show file tree
Hide file tree
Showing 4 changed files with 182 additions and 55 deletions.
2 changes: 1 addition & 1 deletion tests/reference/asr-array_01-9c6ecba.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-9c6ecba.stdout",
"stdout_hash": "141c00a55703c54d1d113b441b052bd1ac7dfc8cc1fb73b243532bfd",
"stdout_hash": "1e36705289359e234e0543e1437e4c9decfcd771f8d6e7e297a8948a",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
92 changes: 64 additions & 28 deletions tests/reference/asr-array_01-9c6ecba.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -203,38 +203,74 @@
)
(=
(Var 3 arr2d)
(ArrayConstant
[(IntegerConstant 1 (Integer 4))
(IntegerConstant 2 (Integer 4))
(IntegerConstant 3 (Integer 4))
(IntegerConstant 4 (Integer 4))
(IntegerConstant 5 (Integer 4))
(IntegerConstant 6 (Integer 4))
(IntegerConstant 8 (Integer 4))
(IntegerConstant 9 (Integer 4))
(IntegerConstant 10 (Integer 4))
(IntegerConstant 11 (Integer 4))
(IntegerConstant 12 (Integer 4))
(IntegerConstant 13 (Integer 4))
(IntegerConstant 14 (Integer 4))
(IntegerConstant 15 (Integer 4))
(IntegerConstant 16 (Integer 4))
(IntegerConstant 17 (Integer 4))
(IntegerConstant 18 (Integer 4))
(IntegerConstant 19 (Integer 4))
(IntegerConstant 20 (Integer 4))
(IntegerConstant 21 (Integer 4))
(IntegerConstant 22 (Integer 4))
(IntegerConstant 23 (Integer 4))
(IntegerConstant 24 (Integer 4))
(IntegerConstant 25 (Integer 4))]
(ArrayReshape
(ArrayConstant
[(IntegerConstant 1 (Integer 4))
(IntegerConstant 2 (Integer 4))
(IntegerConstant 3 (Integer 4))
(IntegerConstant 4 (Integer 4))
(IntegerConstant 5 (Integer 4))
(IntegerConstant 6 (Integer 4))
(IntegerConstant 8 (Integer 4))
(IntegerConstant 9 (Integer 4))
(IntegerConstant 10 (Integer 4))
(IntegerConstant 11 (Integer 4))
(IntegerConstant 12 (Integer 4))
(IntegerConstant 13 (Integer 4))
(IntegerConstant 14 (Integer 4))
(IntegerConstant 15 (Integer 4))
(IntegerConstant 16 (Integer 4))
(IntegerConstant 17 (Integer 4))
(IntegerConstant 18 (Integer 4))
(IntegerConstant 19 (Integer 4))
(IntegerConstant 20 (Integer 4))
(IntegerConstant 21 (Integer 4))
(IntegerConstant 22 (Integer 4))
(IntegerConstant 23 (Integer 4))
(IntegerConstant 24 (Integer 4))
(IntegerConstant 25 (Integer 4))]
(Array
(Integer 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 24 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
(ArrayPhysicalCast
(ArrayConstant
[(IntegerConstant 4 (Integer 4))
(IntegerConstant 3 (Integer 4))
(IntegerConstant 2 (Integer 4))]
(Array
(Integer 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
FixedSizeArray
DescriptorArray
(Array
(Integer 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
DescriptorArray
)
()
)
(Array
(Integer 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 24 (Integer 4)))]
[(()
())
(()
())
(()
())]
FixedSizeArray
)
RowMajor
()
)
()
)
Expand Down
4 changes: 2 additions & 2 deletions tests/reference/asr-array_04-be6ac8a.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"basename": "asr-array_04-be6ac8a",
"cmd": "lc --asr-dump --no-color {infile} -o {outfile} -extra-arg=\"\"",
"infile": "tests/../integration_tests/array_04.cpp",
"infile_hash": "a3e79a9500684211e6e080dc262e6f1e5005e257df6d05381f9dc9c6",
"infile_hash": "dd38786061d4a19743e4c32c2a3ecb08193777f81a2a0d3e87af0f0a",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-array_04-be6ac8a.stdout",
"stdout_hash": "8ccda65df8bedf43f3a0c20870b16ce84c05bc2dad0df3e41ddd122e",
"stdout_hash": "527842cbdfdfac8d3cf494d61c760428aa51ec431fcf2b3e5d2827cd",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
139 changes: 115 additions & 24 deletions tests/reference/asr-array_04-be6ac8a.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,29 @@
Public
Required
.false.
),
res:
(Variable
2
res
[]
Local
()
()
Default
(Allocatable
(Array
(Real 8)
[(()
())]
DescriptorArray
)
)
()
Source
Public
Required
.false.
)
})
main
Expand Down Expand Up @@ -149,36 +172,45 @@
)
RowMajor
)
(ArrayConstant
[(ArraySize
(Var 2 arr1)
(IntegerConstant 1 (Integer 4))
(Integer 4)
()
(ArrayPhysicalCast
(ArrayConstant
[(ArraySize
(Var 2 arr1)
(IntegerConstant 1 (Integer 4))
(Integer 4)
()
)
(ArraySize
(Var 2 arr1)
(IntegerConstant 2 (Integer 4))
(Integer 4)
()
)]
(Array
(Integer 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 2 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
(ArraySize
(Var 2 arr1)
(IntegerConstant 2 (Integer 4))
(Integer 4)
()
)]
FixedSizeArray
DescriptorArray
(Array
(Integer 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 2 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
(Allocatable
(Array
(Real 8)
[(()
())
(()
())]
DescriptorArray
)
()
)
(Array
(Real 8)
[(()
())
(()
())]
FixedSizeArray
)
()
)
Expand Down Expand Up @@ -219,8 +251,67 @@
)
()
)
(Allocate
[((Var 2 res)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
()
())]
()
()
()
)
(=
(Var 2 res)
(RealBinOp
(ArraySection
(Var 2 arr1)
[(()
(IntegerConstant 1 (Integer 4))
())
((ArrayBound
(Var 2 arr1)
(IntegerConstant 2 (Integer 4))
(Integer 4)
LBound
()
)
(ArrayBound
(Var 2 arr1)
(IntegerConstant 2 (Integer 4))
(Integer 4)
UBound
()
)
(IntegerConstant 1 (Integer 4)))]
(Array
(Real 8)
[(()
())]
DescriptorArray
)
()
)
Add
(Var 2 arr2)
(Array
(Real 8)
[(()
())]
DescriptorArray
)
()
)
()
)
(Print
[(Var 2 arr1)
(Var 2 arr2)]
()
()
)
(Print
[(Var 2 arr2)]
[(Var 2 res)]
()
()
)
Expand Down

0 comments on commit 12d6345

Please sign in to comment.