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

Unified Diff: tests/language/list_test.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
« no previous file with comments | « tests/language/language_dart2js.status ('k') | tests/language/local_function_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/list_test.dart
diff --git a/tests/language/list_test.dart b/tests/language/list_test.dart
index 8ab8870a67ce6d72c91632bf35359af06f63c6df..a94b14b5d530bb93f1c0419941e2a39cedd041fe 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>(10);
+ List<int> a = new List<int>.fixedLength(10);
int count = 0;
// Basic iteration over ObjectList.
@@ -42,7 +42,7 @@ class ListTest {
static void testMain() {
int len = 10;
- List a = new List(len);
+ List a = new List.fixedLength(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(4);
+ List a = new List.fixedLength(4);
a.setRange(1, 1, a, null);
- }, (e) => true);
+ });
Expect.throws(() {
- List a = new List(4);
+ List a = new List.fixedLength(4);
a.setRange(10, 1, a, 1);
}, (e) => e is RangeError);
- a = new List(4);
- List b = new List(4);
+ a = new List.fixedLength(4);
+ List b = new List.fixedLength(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(-1), (e) => true);
- Expect.throws(() => new List(99999999999999999999999), (e) => true);
+ Expect.throws(() => new List.fixedLength(-1));
+ Expect.throws(() => new List.fixedLength(99999999999999999999999));
List list = new List();
// We cannot write just 'list.removeLast' due to issue 3769.
« no previous file with comments | « tests/language/language_dart2js.status ('k') | tests/language/local_function_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698