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

Unified Diff: tests/corelib/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/corelib/list_set_range_test.dart ('k') | tests/corelib/map_keys2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/list_test.dart
diff --git a/tests/corelib/list_test.dart b/tests/corelib/list_test.dart
index 672504f123e1619d68b75ba7f1f7f0b922bfd0cd..970eba5e16cccbb3654b6611c1d73000bfe1166c 100644
--- a/tests/corelib/list_test.dart
+++ b/tests/corelib/list_test.dart
@@ -21,14 +21,14 @@ class ListTest {
static void testClosures(List list) {
testMap(val) {return val * 2 + 10; }
- Collection mapped = list.map(testMap);
+ List mapped = list.mappedBy(testMap).toList();
Expect.equals(mapped.length, list.length);
for (var i = 0; i < list.length; i++) {
Expect.equals(mapped[i], list[i]*2 + 10);
}
testFilter(val) { return val == 3; }
- Collection filtered = list.filter(testFilter);
+ Iterable filtered = list.where(testFilter);
Expect.equals(filtered.length, 1);
testEvery(val) { return val != 11; }
@@ -36,20 +36,20 @@ class ListTest {
Expect.equals(true, test);
testSome(val) { return val == 1; }
- test = list.some(testSome);
+ test = list.any(testSome);
Expect.equals(true, test);
testSomeFirst(val) { return val == 0; }
- test = list.some(testSomeFirst);
+ test = list.any(testSomeFirst);
Expect.equals(true, test);
testSomeLast(val) { return val == (list.length - 1); }
- test = list.some(testSomeLast);
+ test = list.any(testSomeLast);
Expect.equals(true, test);
}
static void testList() {
- List list = new List(4);
+ List list = new List.fixedLength(4);
Expect.equals(list.length, 4);
list[0] = 4;
expectValues(list, 4, null, null, null);
« no previous file with comments | « tests/corelib/list_set_range_test.dart ('k') | tests/corelib/map_keys2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698