Index: pkg/unittest/lib/src/iterable_matchers.dart |
=================================================================== |
--- pkg/unittest/lib/src/iterable_matchers.dart (revision 25450) |
+++ pkg/unittest/lib/src/iterable_matchers.dart (working copy) |
@@ -58,15 +58,21 @@ |
} |
/** |
+ * Deprecated form of [anyElement]. |
+ */ |
+@deprecated |
+Matcher someElement(matcher) => new _AnyElement(wrapMatcher(matcher)); |
+ |
+/** |
* Returns a matcher which matches [Iterable]s in which at least one |
* element matches the given [matcher]. |
*/ |
-Matcher someElement(matcher) => new _SomeElement(wrapMatcher(matcher)); |
+Matcher anyElement(matcher) => new _AnyElement(wrapMatcher(matcher)); |
-class _SomeElement extends _IterableMatcher { |
+class _AnyElement extends _IterableMatcher { |
Matcher _matcher; |
- _SomeElement(this._matcher); |
+ _AnyElement(this._matcher); |
bool matches(item, Map matchState) { |
return item.any((e) => _matcher.matches(e, matchState)); |
Sean Eagan
2013/07/25 16:55:15
In describe below, 'some element ' -> 'any element
gram
2013/07/25 17:07:05
I thought about that but IMO 'some element' reads
|