| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.expect; | |
| 6 | |
| 7 import 'package:matcher/matcher.dart'; | 5 import 'package:matcher/matcher.dart'; |
| 8 | 6 |
| 9 import '../backend/closed_exception.dart'; | 7 import '../backend/closed_exception.dart'; |
| 10 import '../backend/invoker.dart'; | 8 import '../backend/invoker.dart'; |
| 11 | 9 |
| 12 /// An exception thrown when a test assertion fails. | 10 /// An exception thrown when a test assertion fails. |
| 13 class TestFailure { | 11 class TestFailure { |
| 14 final String message; | 12 final String message; |
| 15 | 13 |
| 16 TestFailure(this.message); | 14 TestFailure(this.message); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 69 |
| 72 var mismatchDescription = new StringDescription(); | 70 var mismatchDescription = new StringDescription(); |
| 73 matcher.describeMismatch(actual, mismatchDescription, matchState, verbose); | 71 matcher.describeMismatch(actual, mismatchDescription, matchState, verbose); |
| 74 | 72 |
| 75 if (mismatchDescription.length > 0) { | 73 if (mismatchDescription.length > 0) { |
| 76 description.add(' Which: ${mismatchDescription}\n'); | 74 description.add(' Which: ${mismatchDescription}\n'); |
| 77 } | 75 } |
| 78 if (reason != null) description.add(reason).add('\n'); | 76 if (reason != null) description.add(reason).add('\n'); |
| 79 return description.toString(); | 77 return description.toString(); |
| 80 } | 78 } |
| OLD | NEW |