Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: pkg/unittest/lib/src/expect.dart

Issue 22999018: TestFailure + Error baseclass = stack traces! (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/src/expect.dart
diff --git a/pkg/unittest/lib/src/expect.dart b/pkg/unittest/lib/src/expect.dart
index 0df90685b6b6b6bfe827c6d003d43bd6c2222f0f..94b04078dd42e88ba30a8445673c3fa9d4b9e9a6 100644
--- a/pkg/unittest/lib/src/expect.dart
+++ b/pkg/unittest/lib/src/expect.dart
@@ -5,15 +5,12 @@
part of matcher;
/** The objects thrown by the default failure handler. */
-class TestFailure {
- String _message;
+class TestFailure extends Error{
+ final String message;
- get message => _message;
- set message(String value) => _message = value;
+ TestFailure(this.message);
- TestFailure(String message) : _message = message;
-
- String toString() => _message;
+ String toString() => message;
}
/**
@@ -30,7 +27,7 @@ void addStateInfo(Map matchState, Map values) {
/**
* Some matchers, like those for Futures and exception testing,
* can fail in asynchronous sections, and throw exceptions.
- * A user of this library will typically want to catch and handle
+ * A user of this library will typically want to catch and handle
* such exceptions. The [wrapAsync] property is a function that
* can wrap callbacks used by these Matchers so that they can be
* used safely. For example, the unittest library will set this
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698