| 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.error_matchers; | |
| 6 | |
| 7 import 'core_matchers.dart'; | 5 import 'core_matchers.dart'; |
| 8 import 'interfaces.dart'; | 6 import 'interfaces.dart'; |
| 9 | 7 |
| 10 /// A matcher for ArgumentErrors. | 8 /// A matcher for ArgumentErrors. |
| 11 const Matcher isArgumentError = const _ArgumentError(); | 9 const Matcher isArgumentError = const _ArgumentError(); |
| 12 | 10 |
| 13 class _ArgumentError extends TypeMatcher { | 11 class _ArgumentError extends TypeMatcher { |
| 14 const _ArgumentError() : super("ArgumentError"); | 12 const _ArgumentError() : super("ArgumentError"); |
| 15 bool matches(item, Map matchState) => item is ArgumentError; | 13 bool matches(item, Map matchState) => item is ArgumentError; |
| 16 } | 14 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 bool matches(item, Map matchState) => item is UnimplementedError; | 86 bool matches(item, Map matchState) => item is UnimplementedError; |
| 89 } | 87 } |
| 90 | 88 |
| 91 /// A matcher for UnsupportedError. | 89 /// A matcher for UnsupportedError. |
| 92 const Matcher isUnsupportedError = const _UnsupportedError(); | 90 const Matcher isUnsupportedError = const _UnsupportedError(); |
| 93 | 91 |
| 94 class _UnsupportedError extends TypeMatcher { | 92 class _UnsupportedError extends TypeMatcher { |
| 95 const _UnsupportedError() : super("UnsupportedError"); | 93 const _UnsupportedError() : super("UnsupportedError"); |
| 96 bool matches(item, Map matchState) => item is UnsupportedError; | 94 bool matches(item, Map matchState) => item is UnsupportedError; |
| 97 } | 95 } |
| OLD | NEW |