OLD | NEW |
1 part of unittest; | |
2 | |
3 // 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 |
4 // 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 |
5 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
6 | 4 |
7 | 5 |
8 /** | 6 /** |
9 * Returns a matcher that matches empty strings, maps or collections. | 7 * Returns a matcher that matches empty strings, maps or collections. |
10 */ | 8 */ |
11 const Matcher isEmpty = const _Empty(); | 9 const Matcher isEmpty = const _Empty(); |
12 | 10 |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 final _matcher; | 618 final _matcher; |
621 final String _description; | 619 final String _description; |
622 | 620 |
623 const _Predicate(this._matcher, this._description); | 621 const _Predicate(this._matcher, this._description); |
624 | 622 |
625 bool matches(item, MatchState matchState) => _matcher(item); | 623 bool matches(item, MatchState matchState) => _matcher(item); |
626 | 624 |
627 Description describe(Description description) => | 625 Description describe(Description description) => |
628 description.add(_description); | 626 description.add(_description); |
629 } | 627 } |
OLD | NEW |