Skip to content

Commit e376bcd

Browse files
munificentcommit-bot@chromium.org
authored andcommitted
Rename "string/overflow.dart" -> "string/overflow_test.dart".
Change-Id: I32fa46c5750ee6d2410231322bf16fa7decb751d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201227 Auto-Submit: Bob Nystrom <rnystrom@google.com> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com> Commit-Queue: Bob Nystrom <rnystrom@google.com>
1 parent b72588a commit e376bcd

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

tests/language/string/overflow.dart renamed to tests/standalone/string_overflow_test.dart

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ main() {
1111
String a = "a";
1212
for (; a.length < 256 * 1024 * 1024;) a = a + a;
1313

14-
var exception_thrown = false;
15-
try {
16-
var concat = "$a$a$a$a$a$a$a$a";
17-
} on OutOfMemoryError catch (exc) {
18-
exception_thrown = true;
19-
}
20-
Expect.isTrue(exception_thrown);
14+
var concat = "$a$a$a$a$a$a$a$a";
15+
Expect.equals(concat.length, 2147483648);
2116
}

tests/language_2/string/overflow.dart renamed to tests/standalone_2/string_overflow_test.dart

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ main() {
1313
String a = "a";
1414
for (; a.length < 256 * 1024 * 1024;) a = a + a;
1515

16-
var exception_thrown = false;
17-
try {
18-
var concat = "$a$a$a$a$a$a$a$a";
19-
} on OutOfMemoryError catch (exc) {
20-
exception_thrown = true;
21-
}
22-
Expect.isTrue(exception_thrown);
16+
var concat = "$a$a$a$a$a$a$a$a";
17+
Expect.equals(concat.length, 2147483648);
2318
}

0 commit comments

Comments
 (0)