| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library matcher.iterable_matchers; | |
| 6 | |
| 7 import 'core_matchers.dart'; | 5 import 'core_matchers.dart'; |
| 8 import 'description.dart'; | 6 import 'description.dart'; |
| 9 import 'interfaces.dart'; | 7 import 'interfaces.dart'; |
| 10 import 'util.dart'; | 8 import 'util.dart'; |
| 11 | 9 |
| 12 /// Returns a matcher which matches [Iterable]s in which all elements | 10 /// Returns a matcher which matches [Iterable]s in which all elements |
| 13 /// match the given [matcher]. | 11 /// match the given [matcher]. |
| 14 Matcher everyElement(matcher) => new _EveryElement(wrapMatcher(matcher)); | 12 Matcher everyElement(matcher) => new _EveryElement(wrapMatcher(matcher)); |
| 15 | 13 |
| 16 class _EveryElement extends _IterableMatcher { | 14 class _EveryElement extends _IterableMatcher { |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 } else { | 256 } else { |
| 259 return mismatchDescription | 257 return mismatchDescription |
| 260 .add('has ') | 258 .add('has ') |
| 261 .addDescriptionOf(matchState["actual"]) | 259 .addDescriptionOf(matchState["actual"]) |
| 262 .add(' which is not $_description ') | 260 .add(' which is not $_description ') |
| 263 .addDescriptionOf(matchState["expected"]) | 261 .addDescriptionOf(matchState["expected"]) |
| 264 .add(' at index ${matchState["index"]}'); | 262 .add(' at index ${matchState["index"]}'); |
| 265 } | 263 } |
| 266 } | 264 } |
| 267 } | 265 } |
| OLD | NEW |