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

Unified Diff: tests/corelib/collection_removes_test.dart

Issue 12537009: Rename XMatching to XWhere. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge and rebuild dom libraries. Created 7 years, 9 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 | « sdk/lib/web_sql/dartium/web_sql_dartium.dart ('k') | tests/corelib/iterable_first_matching_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/collection_removes_test.dart
diff --git a/tests/corelib/collection_removes_test.dart b/tests/corelib/collection_removes_test.dart
index d057ed865771c34d3f80d0232bea21aa88783e30..7d0448367880096f19f55d6a80c9f44cee2864d5 100644
--- a/tests/corelib/collection_removes_test.dart
+++ b/tests/corelib/collection_removes_test.dart
@@ -45,15 +45,15 @@ testRetainAll(Collection base, Iterable retains) {
}
}
-testRemoveMatching(Collection base, bool test(value)) {
+testRemoveWhere(Collection base, bool test(value)) {
Set retained = new Set();
for (var element in base) {
if (!test(element)) {
retained.add(element);
}
}
- String name = "$base.removeMatching(...) -> $retained";
- base.removeMatching(test);
+ String name = "$base.removeWhere(...) -> $retained";
+ base.removeWhere(test);
for (var value in base) {
Expect.isFalse(test(value), "$name: Found $value");
}
@@ -62,15 +62,15 @@ testRemoveMatching(Collection base, bool test(value)) {
}
}
-testRetainMatching(Collection base, bool test(value)) {
+testRetainWhere(Collection base, bool test(value)) {
Set retained = new Set();
for (var element in base) {
if (test(element)) {
retained.add(element);
}
}
- String name = "$base.retainMatching(...) -> $retained";
- base.retainMatching(test);
+ String name = "$base.retainWhere(...) -> $retained";
+ base.retainWhere(test);
for (var value in base) {
Expect.isTrue(test(value), "$name: Found $value");
}
@@ -94,16 +94,16 @@ void main() {
testRemoveAll(base.toList(), deltaSet);
testRetainAll(base.toList(), delta);
testRetainAll(base.toList(), deltaSet);
- testRemoveMatching(base.toList(), deltaSet.contains);
- testRetainMatching(base.toList(),
+ testRemoveWhere(base.toList(), deltaSet.contains);
+ testRetainWhere(base.toList(),
(e) => !deltaSet.contains(e));
testRemoveAll(base.toSet(), delta);
testRemoveAll(base.toSet(), deltaSet);
testRetainAll(base.toSet(), delta);
testRetainAll(base.toSet(), deltaSet);
- testRemoveMatching(base.toSet(), deltaSet.contains);
- testRetainMatching(base.toSet(), (e) => !deltaSet.contains(e));
+ testRemoveWhere(base.toSet(), deltaSet.contains);
+ testRetainWhere(base.toSet(), (e) => !deltaSet.contains(e));
}
}
}
« no previous file with comments | « sdk/lib/web_sql/dartium/web_sql_dartium.dart ('k') | tests/corelib/iterable_first_matching_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698