OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.prints_matcher; | 5 library unittest.prints_matcher; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:matcher/matcher.dart' hide completes, wrapAsync, expect; | 9 import 'package:matcher/matcher.dart' hide completes, wrapAsync, expect; |
10 | 10 |
11 import '../unittest.dart'; | 11 import '../unittest.dart'; |
12 | 12 |
13 /// Matches a [Function] that prints text that matches [matcher]. | 13 /// Matches a [Function] that prints text that matches [matcher]. |
14 /// | 14 /// |
15 /// [matcher] may be a String or a [Matcher]. | 15 /// [matcher] may be a String or a [Matcher]. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 .describeMismatch(actual, new StringDescription(), matchState, verbose) | 62 .describeMismatch(actual, new StringDescription(), matchState, verbose) |
63 .toString(); | 63 .toString(); |
64 | 64 |
65 if (innerMismatch.isNotEmpty) { | 65 if (innerMismatch.isNotEmpty) { |
66 description.add('\n Which: ').add(innerMismatch.toString()); | 66 description.add('\n Which: ').add(innerMismatch.toString()); |
67 } | 67 } |
68 | 68 |
69 return description; | 69 return description; |
70 } | 70 } |
71 } | 71 } |
OLD | NEW |