| 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.numeric_matchers; | |
| 6 | |
| 7 import 'interfaces.dart'; | 5 import 'interfaces.dart'; |
| 8 | 6 |
| 9 /// Returns a matcher which matches if the match argument is greater | 7 /// Returns a matcher which matches if the match argument is greater |
| 10 /// than the given [value]. | 8 /// than the given [value]. |
| 11 Matcher greaterThan(value) => | 9 Matcher greaterThan(value) => |
| 12 new _OrderingComparison(value, false, false, true, 'a value greater than'); | 10 new _OrderingComparison(value, false, false, true, 'a value greater than'); |
| 13 | 11 |
| 14 /// Returns a matcher which matches if the match argument is greater | 12 /// Returns a matcher which matches if the match argument is greater |
| 15 /// than or equal to the given [value]. | 13 /// than or equal to the given [value]. |
| 16 Matcher greaterThanOrEqualTo(value) => new _OrderingComparison( | 14 Matcher greaterThanOrEqualTo(value) => new _OrderingComparison( |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 Description describeMismatch( | 191 Description describeMismatch( |
| 194 item, Description mismatchDescription, Map matchState, bool verbose) { | 192 item, Description mismatchDescription, Map matchState, bool verbose) { |
| 195 if (item is! num) { | 193 if (item is! num) { |
| 196 return mismatchDescription.addDescriptionOf(item).add(' not numeric'); | 194 return mismatchDescription.addDescriptionOf(item).add(' not numeric'); |
| 197 } else { | 195 } else { |
| 198 return super.describeMismatch( | 196 return super.describeMismatch( |
| 199 item, mismatchDescription, matchState, verbose); | 197 item, mismatchDescription, matchState, verbose); |
| 200 } | 198 } |
| 201 } | 199 } |
| 202 } | 200 } |
| OLD | NEW |