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

Skip to content

Commit 248acda

Browse files
committed
Updated tests
1 parent 7c5cd83 commit 248acda

File tree

254 files changed

+4091
-8338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+4091
-8338
lines changed

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2172,7 +2172,7 @@ class CommonVisitor : public AST::BaseVisitor<StructType> {
21722172
return;
21732173
} else if ((right_is_int || left_is_int) && op == ASR::binopType::Mul) {
21742174
// string repeat
2175-
int64_t left_int = 0, right_int = 0, dest_len = 0;
2175+
int64_t left_int = 0, right_int = 0;
21762176
if (right_is_int && ASRUtils::expr_value(right) != nullptr) {
21772177
if(ASRUtils::is_descriptorString(ASRUtils::expr_type(left))) {
21782178
left = ASRUtils::cast_string_descriptor_to_pointer(al, left);
@@ -2235,7 +2235,6 @@ class CommonVisitor : public AST::BaseVisitor<StructType> {
22352235
std::ostringstream os;
22362236
std::fill_n(std::ostream_iterator<std::string>(os), repeat, std::string(str));
22372237
result = s2c(al, os.str());
2238-
LCOMPILERS_ASSERT((int64_t)strlen(result) == dest_len)
22392238
value = ASR::down_cast<ASR::expr_t>(ASR::make_StringConstant_t(
22402239
al, loc, result, dest_type));
22412240
}

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": "05ca1977931143e33bcb81f91fdd4047b21b4d4f235997d0303f34a5",
9+
"stdout_hash": "cd8c6c5b159ccd4d81066d59f627a9d7887f2a8934d5de880642a428",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

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

Lines changed: 98 additions & 79 deletions
Large diffs are not rendered by default.

tests/reference/asr-array_02_decl-e8f6874.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_02_decl-e8f6874.stdout",
9-
"stdout_hash": "bd72deea4a40ebc1a4f98f17667fb9dfdc58ab6ba4637553d9f348db",
9+
"stdout_hash": "06583ae517392f7c69754b24f71b1fe6ba5010a95eba476c24e2234c",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-array_02_decl-e8f6874.stdout

Lines changed: 73 additions & 59 deletions
Large diffs are not rendered by default.

tests/reference/asr-assert1-1ce92ea.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-assert1-1ce92ea.stdout",
9-
"stdout_hash": "a8136d0e4e4df7ac08116e4153b2f4f05a9b31c79c3c7da650467c4c",
9+
"stdout_hash": "2c3f51f1452b2dea3496f20b4852d1cb24bffba0d3d26848bb734b35",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-assert1-1ce92ea.stdout

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
.false.
3131
.false.
3232
()
33+
.false.
3334
)
3435
})
3536
test_assert
@@ -65,7 +66,7 @@
6566
)
6667
(StringConstant
6768
"a is not 5"
68-
(String 1 10 () PointerString)
69+
(String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength PointerString)
6970
)
7071
)
7172
(Assert

tests/reference/asr-assign1-886f049.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/reference/asr-assign1-886f049.stdout

Lines changed: 0 additions & 214 deletions
This file was deleted.

tests/reference/asr-assign2-8d1a2ee.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-assign2-8d1a2ee.stdout",
9-
"stdout_hash": "c333f29f89373628e3a708b7ef4834e9e666e8652ebabcadb3bb33c6",
9+
"stdout_hash": "7e194a3fc1e68cf3a5700276d5fbb442b05b0851697bd421493d101c",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-assign2-8d1a2ee.stdout

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
.false.
4040
.false.
4141
()
42+
.false.
4243
),
4344
f2:
4445
(Variable
@@ -64,6 +65,7 @@
6465
.false.
6566
.false.
6667
()
68+
.false.
6769
),
6870
i:
6971
(Variable
@@ -83,6 +85,7 @@
8385
.false.
8486
.false.
8587
()
88+
.false.
8689
),
8790
i2:
8891
(Variable
@@ -107,6 +110,7 @@
107110
.false.
108111
.false.
109112
()
113+
.false.
110114
)
111115
})
112116
__main__

tests/reference/asr-bindc_01-6d521a9.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_01-6d521a9.stdout",
9-
"stdout_hash": "bc08c331380de85b26aa641d87ba379c5204adc440750a5e2744e47f",
9+
"stdout_hash": "0f2c73a99b6bfb0c0e4e008e263300eb9ac409ae54c10eedca3838a9",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-bindc_01-6d521a9.stdout

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
[(Var 2 queries)
4444
(Var 2 x)]
4545
FormatPythonFormat
46-
(String -1 0 () PointerString)
46+
(String 1 () ExpressionLength CString)
4747
()
4848
)
4949
)
@@ -81,6 +81,7 @@
8181
.false.
8282
.false.
8383
()
84+
.false.
8485
),
8586
test_issue_1781:
8687
(Function
@@ -105,6 +106,7 @@
105106
.false.
106107
.false.
107108
()
109+
.false.
108110
)
109111
})
110112
test_issue_1781
@@ -186,6 +188,7 @@
186188
.false.
187189
.false.
188190
()
191+
.false.
189192
)
190193
})
191194
__main__

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

0 commit comments

Comments
 (0)