Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: tests/compiler/dart2js/value_range_test.dart

Issue 12328104: Change new List(n) to return fixed length list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/value_range_test.dart
diff --git a/tests/compiler/dart2js/value_range_test.dart b/tests/compiler/dart2js/value_range_test.dart
index fdf0b6b0fdb588e9f99693ad6bfd918c7b629eca..e1bfe7323f8c37bf41db6e3734de99419b5a3f0c 100644
--- a/tests/compiler/dart2js/value_range_test.dart
+++ b/tests/compiler/dart2js/value_range_test.dart
@@ -40,7 +40,7 @@ ABOVE_ZERO,
main(check) {
// Make sure value is an int.
var value = check ? 42 : 54;
- var a = new List.fixedLength(value);
+ var a = new List(value);
var sum = 0;
for (int i = 0; i < value; i++) {
sum += a[i];
@@ -68,7 +68,7 @@ KEPT,
"""
main() {
- var a = new List.fixedLength(4);
+ var a = new List(4);
return a[0];
}
""",
@@ -76,7 +76,7 @@ REMOVED,
"""
main() {
- var a = new List.fixedLength(4);
+ var a = new List(4);
return a.removeLast();
}
""",
@@ -84,7 +84,7 @@ REMOVED,
"""
main(value) {
- var a = new List.fixedLength(value);
+ var a = new List(value);
return a[value];
}
""",
@@ -92,7 +92,7 @@ KEPT,
"""
main(value) {
- var a = new List.fixedLength(1024);
+ var a = new List(1024);
return a[1023 & value];
}
""",
@@ -100,7 +100,7 @@ REMOVED,
"""
main(value) {
- var a = new List.fixedLength(1024);
+ var a = new List(1024);
return a[1024 & value];
}
""",
@@ -212,8 +212,8 @@ const String DEFAULT_CORELIB_WITH_LIST_INTERFACE = r'''
class Type {}
class Function {}
class List {
- List();
- List.fixedLength(length);
+ List([int length]);
+ List.filled(int length, fill);
}
abstract class Map {}
class Closure {}

Powered by Google App Engine
This is Rietveld 408576698