Skip to content

Commit

Permalink
Updated reference tests
Browse files Browse the repository at this point in the history
  • Loading branch information
czgdp1807 committed Jul 4, 2023
1 parent f921499 commit 0b98e36
Show file tree
Hide file tree
Showing 39 changed files with 816 additions and 82 deletions.
8 changes: 4 additions & 4 deletions integration_tests/test_dict_increment.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ def test_dict_increment():
d_int_int[1] += i1
i2 += i1
assert d_int_int[1] == i2

i2 = 10
d_int_int = {0: 0, 1: 0}
for i1 in range(i2):
d_int_int[i1 % 2] += 1
assert d_int_int[0] == d_int_int[1]
assert d_int_int[0] == i2 // 2

j1 = 2.0
d_int_float = {2: j1}
while j1 < 4.0:
d_int_float[2] += 0.1
j1 += 0.1
assert d_int_float[2] == j1

j1 = 0.0
j2 = 0.0
d_bool_float = {True: 0.0, False: 0.0}
Expand All @@ -63,4 +63,4 @@ def test_dict_increment():
s1 += str(i1)
assert d_int_str[-1] == s1

test_dict_increment()
test_dict_increment()
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": "f8ba6c730aea2846362708c15bb4ff33f587f833f791d26b55fc70b8",
"stdout_hash": "dd9152135900885d4e4e13ad4877666492a73480c436267dd94567c0",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
82 changes: 77 additions & 5 deletions tests/reference/asr-array_01_decl-39cf894.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
(Real 4)
[(()
())]
DescriptorArray
)
()
Source
Expand All @@ -140,6 +141,7 @@
(Real 4)
[(()
())]
DescriptorArray
)]
(Real 4)
Source
Expand Down Expand Up @@ -234,6 +236,7 @@
(Real 8)
[(()
())]
DescriptorArray
)
()
Source
Expand All @@ -248,6 +251,7 @@
(Real 8)
[(()
())]
DescriptorArray
)]
(Real 8)
Source
Expand Down Expand Up @@ -334,6 +338,7 @@
(Integer 2)
[(()
())]
DescriptorArray
)
()
Source
Expand All @@ -348,6 +353,7 @@
(Integer 2)
[(()
())]
DescriptorArray
)]
(Integer 2)
Source
Expand Down Expand Up @@ -436,6 +442,7 @@
(Integer 4)
[(()
())]
DescriptorArray
)
()
Source
Expand All @@ -450,6 +457,7 @@
(Integer 4)
[(()
())]
DescriptorArray
)]
(Integer 4)
Source
Expand Down Expand Up @@ -533,6 +541,7 @@
(Integer 8)
[(()
())]
DescriptorArray
)
()
Source
Expand All @@ -547,6 +556,7 @@
(Integer 8)
[(()
())]
DescriptorArray
)]
(Integer 8)
Source
Expand Down Expand Up @@ -619,6 +629,7 @@
(Complex 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
()
Source
Expand All @@ -639,6 +650,7 @@
(Complex 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))]
FixedSizeArray
)
()
Source
Expand All @@ -659,6 +671,7 @@
(Real 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
()
Source
Expand All @@ -679,6 +692,7 @@
(Real 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))]
FixedSizeArray
)
()
Source
Expand All @@ -699,6 +713,7 @@
(Integer 2)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
()
Source
Expand All @@ -719,6 +734,7 @@
(Integer 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
FixedSizeArray
)
()
Source
Expand All @@ -739,6 +755,7 @@
(Integer 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))]
FixedSizeArray
)
()
Source
Expand Down Expand Up @@ -774,7 +791,18 @@
[(FunctionCall
208 accept_i16_array
()
[((Var 205 ai16))]
[((ArrayPhysicalCast
(Var 205 ai16)
FixedSizeArray
DescriptorArray
(Array
(Integer 2)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
DescriptorArray
)
()
))]
(Integer 2)
()
()
Expand All @@ -787,7 +815,18 @@
[(FunctionCall
208 accept_i32_array
()
[((Var 205 ai32))]
[((ArrayPhysicalCast
(Var 205 ai32)
FixedSizeArray
DescriptorArray
(Array
(Integer 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
DescriptorArray
)
()
))]
(Integer 4)
()
()
Expand All @@ -800,7 +839,18 @@
[(FunctionCall
208 accept_i64_array
()
[((Var 205 ai64))]
[((ArrayPhysicalCast
(Var 205 ai64)
FixedSizeArray
DescriptorArray
(Array
(Integer 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))]
DescriptorArray
)
()
))]
(Integer 8)
()
()
Expand All @@ -813,7 +863,18 @@
[(FunctionCall
208 accept_f32_array
()
[((Var 205 af32))]
[((ArrayPhysicalCast
(Var 205 af32)
FixedSizeArray
DescriptorArray
(Array
(Real 4)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 3 (Integer 4)))]
DescriptorArray
)
()
))]
(Real 4)
()
()
Expand All @@ -826,7 +887,18 @@
[(FunctionCall
208 accept_f64_array
()
[((Var 205 af64))]
[((ArrayPhysicalCast
(Var 205 af64)
FixedSizeArray
DescriptorArray
(Array
(Real 8)
[((IntegerConstant 0 (Integer 4))
(IntegerConstant 10 (Integer 4)))]
DescriptorArray
)
()
))]
(Real 8)
()
()
Expand Down
2 changes: 1 addition & 1 deletion tests/reference/asr-array_02_decl-e8f6874.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_02_decl-e8f6874.stdout",
"stdout_hash": "54f947ef59beab10149fb69a1dafc8691c782ca6b9e0242eba878eda",
"stdout_hash": "ff86e48c2aec878635ceaddd671e0b89e6e20ad69c3944cd7dbfb88a",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
Loading

0 comments on commit 0b98e36

Please sign in to comment.