Chromium Code Reviews| Index: pkg/unittest/lib/src/test_case.dart |
| =================================================================== |
| --- pkg/unittest/lib/src/test_case.dart (revision 28320) |
| +++ pkg/unittest/lib/src/test_case.dart (working copy) |
| @@ -41,6 +41,9 @@ |
| */ |
| String get result => _result; |
| + /** Returns whether this test case passed. */ |
| + bool get passed => _result == PASS; |
| + |
| StackTrace _stackTrace; |
| /** Stack trace associated with this test, or [null] if it succeeded. */ |
| StackTrace get stackTrace => _stackTrace; |
| @@ -187,4 +190,12 @@ |
| pass(); |
| } |
| } |
| + |
| + String toString() { |
|
Siggi Cherem (dart-lang)
2013/10/07 21:39:45
style nit: if it fits on a single line, we could j
devoncarew
2013/10/07 21:45:33
Done.
|
| + if (_result != null) { |
| + return "${description}: ${result}"; |
| + } else { |
| + return description; |
| + } |
| + } |
| } |