Chromium Code Reviews| Index: lib/unittest/core_matchers.dart |
| =================================================================== |
| --- lib/unittest/core_matchers.dart (revision 8951) |
| +++ lib/unittest/core_matchers.dart (working copy) |
| @@ -104,10 +104,11 @@ |
| while (reason == null) { |
| if (expectedIterator.hasNext()) { |
| if (actualIterator.hasNext()) { |
| - reason = matcher(expectedIterator.next(), |
| + Description r = matcher(expectedIterator.next(), |
| actualIterator.next(), |
| 'mismatch at position ${position}', |
| depth); |
| + if (r != null) reason = r.toString(); |
|
srdjan
2012/06/21 00:07:33
Why guard it (r != null)?
(null).toString() shoul
|
| ++position; |
| } else { |
| reason = 'shorter than expected'; |