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

Unified Diff: tests/language/list_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/language/list_test.dart
diff --git a/tests/language/list_test.dart b/tests/language/list_test.dart
index a94b14b5d530bb93f1c0419941e2a39cedd041fe..1a9986f16364f2a558cd40a43c5fe494986fc56f 100644
--- a/tests/language/list_test.dart
+++ b/tests/language/list_test.dart
@@ -5,7 +5,7 @@
class ListTest {
static void TestIterator() {
- List<int> a = new List<int>.fixedLength(10);
+ List<int> a = new List<int>(10);
int count = 0;
// Basic iteration over ObjectList.
@@ -42,7 +42,7 @@ class ListTest {
static void testMain() {
int len = 10;
- List a = new List.fixedLength(len);
+ List a = new List(len);
Expect.equals(true, a is List);
Expect.equals(len, a.length);
a.forEach((element) { Expect.equals(null, element); });
@@ -51,17 +51,17 @@ class ListTest {
Expect.throws(() => a[len], (e) => e is RangeError);
Expect.throws(() {
- List a = new List.fixedLength(4);
+ List a = new List(4);
a.setRange(1, 1, a, null);
});
Expect.throws(() {
- List a = new List.fixedLength(4);
+ List a = new List(4);
a.setRange(10, 1, a, 1);
}, (e) => e is RangeError);
- a = new List.fixedLength(4);
- List b = new List.fixedLength(4);
+ a = new List(4);
+ List b = new List(4);
b.setRange(0, 4, a, 0);
List<int> unsorted = [4, 3, 9, 12, -4, 9];
@@ -95,8 +95,8 @@ class ListTest {
Expect.throws(() => unsorted[2.1],
(e) => e is ArgumentError || e is TypeError);
- Expect.throws(() => new List.fixedLength(-1));
- Expect.throws(() => new List.fixedLength(99999999999999999999999));
+ Expect.throws(() => new List(-1));
+ Expect.throws(() => new List(99999999999999999999999));
List list = new List();
// We cannot write just 'list.removeLast' due to issue 3769.

Powered by Google App Engine
This is Rietveld 408576698