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 test.frontend.prints_matcher; | |
6 | |
7 import 'dart:async'; | 5 import 'dart:async'; |
8 | 6 |
9 import 'package:matcher/matcher.dart'; | 7 import 'package:matcher/matcher.dart'; |
10 | 8 |
11 import 'expect.dart'; | 9 import 'expect.dart'; |
12 import 'future_matchers.dart'; | 10 import 'future_matchers.dart'; |
13 | 11 |
14 /// Matches a [Function] that prints text that matches [matcher]. | 12 /// Matches a [Function] that prints text that matches [matcher]. |
15 /// | 13 /// |
16 /// [matcher] may be a String or a [Matcher]. | 14 /// [matcher] may be a String or a [Matcher]. |
(...skipping 55 matching lines...) Loading... |
72 .describeMismatch(actual, new StringDescription(), matchState, verbose) | 70 .describeMismatch(actual, new StringDescription(), matchState, verbose) |
73 .toString(); | 71 .toString(); |
74 | 72 |
75 if (innerMismatch.isNotEmpty) { | 73 if (innerMismatch.isNotEmpty) { |
76 description.add('\n Which: ').add(innerMismatch.toString()); | 74 description.add('\n Which: ').add(innerMismatch.toString()); |
77 } | 75 } |
78 | 76 |
79 return description; | 77 return description; |
80 } | 78 } |
81 } | 79 } |
OLD | NEW |