| Index: pkg/unittest/lib/src/core_matchers.dart
|
| ===================================================================
|
| --- pkg/unittest/lib/src/core_matchers.dart (revision 21707)
|
| +++ pkg/unittest/lib/src/core_matchers.dart (working copy)
|
| @@ -177,9 +177,8 @@
|
| var aType = typeName(actual);
|
| var includeTypes = eType != aType;
|
| // If we have recursed, show the expected value too; if not,
|
| - // expect() will show it for us. As expect will not show type
|
| - // mismatches at the top level we handle those here too.
|
| - if (includeTypes || depth > 1) {
|
| + // expect() will show it for us.
|
| + if (depth > 0) {
|
| reason.add('expected ');
|
| if (includeTypes) {
|
| reason.add(eType).add(':');
|
| @@ -191,6 +190,9 @@
|
| reason.add(aType).add(':');
|
| }
|
| reason.addDescriptionOf(actual);
|
| + if (includeTypes && depth == 0) {
|
| + reason.add(' (not type ').add(eType).add(')');
|
| + }
|
| }
|
| }
|
| if (reason != null && location.length > 0) {
|
|
|