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 Mar 21, 2024
1 parent b2a4e5a commit 341debb
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/reference/asr-array_04-f95b8eb.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"basename": "asr-array_04-f95b8eb",
"cmd": "lc --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/../integration_tests/array_04.cpp",
"infile_hash": "dd38786061d4a19743e4c32c2a3ecb08193777f81a2a0d3e87af0f0a",
"infile_hash": "86bab3bcf300c07e9861e92ce21215829ae2893db1d378776b8ab332",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-array_04-f95b8eb.stdout",
"stdout_hash": "ecd1c3d056e6792b7c6ec0baa0730c74d60745d34d459ffb6122aee1",
"stdout_hash": "b72419a0a8bd62f822377669e6e98ca64a95400f6c7ce7b7ad33a68a",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
165 changes: 163 additions & 2 deletions tests/reference/asr-array_04-f95b8eb.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,27 @@
Public
Required
.false.
),
res_:
(Variable
2
res_
[]
Local
()
()
Default
(Array
(Real 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
()
Source
Public
Required
.false.
)
})
main
Expand Down Expand Up @@ -251,6 +272,31 @@
)
()
)
(=
(Var 2 res_)
(ArrayConstant
[(RealConstant
7.000000
(Real 8)
)
(RealConstant
11.000000
(Real 8)
)
(RealConstant
14.000000
(Real 8)
)]
(Array
(Real 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
RowMajor
)
()
)
(Allocate
[((Var 2 res)
[((IntegerConstant 0 (Integer 4))
Expand Down Expand Up @@ -306,7 +352,25 @@
)
(Print
[(Var 2 arr1)
(Var 2 arr2)]
(StringConstant
"\n"
(Character 1 1 ())
)]
(StringConstant
""
(Character 1 1 ())
)
(StringConstant
""
(Character 1 1 ())
)
)
(Print
[(Var 2 arr2)
(StringConstant
"\n"
(Character 1 1 ())
)]
(StringConstant
""
(Character 1 1 ())
Expand All @@ -317,7 +381,11 @@
)
)
(Print
[(Var 2 res)]
[(Var 2 res)
(StringConstant
"\n"
(Character 1 1 ())
)]
(StringConstant
""
(Character 1 1 ())
Expand All @@ -327,6 +395,99 @@
(Character 1 1 ())
)
)
(If
(IntrinsicArrayFunction
Any
[(RealCompare
(IntrinsicScalarFunction
Abs
[(RealBinOp
(Var 2 res)
Sub
(Var 2 res_)
(Array
(Real 8)
[(()
())]
DescriptorArray
)
()
)]
0
(Array
(Real 8)
[(()
())]
DescriptorArray
)
()
)
Gt
(ArrayBroadcast
(RealConstant
0.000000
(Real 8)
)
(IntrinsicArrayFunction
Shape
[(IntrinsicScalarFunction
Abs
[(RealBinOp
(Var 2 res)
Sub
(Var 2 res_)
(Array
(Real 8)
[(()
())]
DescriptorArray
)
()
)]
0
(Array
(Real 8)
[(()
())]
DescriptorArray
)
()
)
(IntegerConstant 4 (Integer 4))]
0
(Array
(Integer 4)
[((IntegerConstant 1 (Integer 4))
(IntegerConstant 1 (Integer 4)))]
FixedSizeArray
)
()
)
(Array
(Real 8)
[(()
())]
DescriptorArray
)
()
)
(Array
(Logical 4)
[(()
())]
DescriptorArray
)
()
)]
0
(Logical 4)
()
)
[(ErrorStop
(IntegerConstant 2 (Integer 4))
)]
[]
)
(=
(Var 2 __return_var)
(IntegerConstant 0 (Integer 4))
Expand Down

0 comments on commit 341debb

Please sign in to comment.