| 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 unittest.frontend.expect; | 5 library test.frontend.expect; |
| 6 | 6 |
| 7 import 'package:matcher/matcher.dart'; | 7 import 'package:matcher/matcher.dart'; |
| 8 | 8 |
| 9 /// An exception thrown when a test assertion fails. | 9 /// An exception thrown when a test assertion fails. |
| 10 class TestFailure { | 10 class TestFailure { |
| 11 final String message; | 11 final String message; |
| 12 | 12 |
| 13 TestFailure(this.message); | 13 TestFailure(this.message); |
| 14 | 14 |
| 15 String toString() => message; | 15 String toString() => message; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 var mismatchDescription = new StringDescription(); | 63 var mismatchDescription = new StringDescription(); |
| 64 matcher.describeMismatch(actual, mismatchDescription, matchState, verbose); | 64 matcher.describeMismatch(actual, mismatchDescription, matchState, verbose); |
| 65 | 65 |
| 66 if (mismatchDescription.length > 0) { | 66 if (mismatchDescription.length > 0) { |
| 67 description.add(' Which: ${mismatchDescription}\n'); | 67 description.add(' Which: ${mismatchDescription}\n'); |
| 68 } | 68 } |
| 69 if (reason != null) description.add(reason).add('\n'); | 69 if (reason != null) description.add(reason).add('\n'); |
| 70 return description.toString(); | 70 return description.toString(); |
| 71 } | 71 } |
| OLD | NEW |