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

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

Issue 14251006: Remove AsyncError with Expando. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 8 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 | « pkg/unittest/lib/src/future_matchers.dart ('k') | pkg/webdriver/lib/webdriver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/src/test_case.dart
diff --git a/pkg/unittest/lib/src/test_case.dart b/pkg/unittest/lib/src/test_case.dart
index 23d04dee256a733c0e60f2f39d06e10a7ccbf8a4..13d59f5499e66d81c69d5c47369a32274459e758 100644
--- a/pkg/unittest/lib/src/test_case.dart
+++ b/pkg/unittest/lib/src/test_case.dart
@@ -83,7 +83,7 @@ class TestCase {
--_callbackFunctionsOutstanding;
if (f is Future) {
return f.then((_) => _finishTest())
- .catchError((e) => fail("${e.error}"));
+ .catchError((error) => fail("${error}"));
} else {
_finishTest();
return null;
@@ -118,7 +118,7 @@ class TestCase {
// a failed setUp. There is no right answer, but doing it
// seems to be the more conservative approach, because
// unittest will not stop at a test failure.
- error("$description: Test setup failed: ${e.error}");
+ error("$description: Test setup failed: $e");
});
} else {
var f = _runTest();
@@ -175,11 +175,12 @@ class TestCase {
rtn.then((_) {
_notifyComplete();
})
- .catchError((e) {
+ .catchError((error) {
+ var trace = getAttachedStackTrace(error);
// We don't call fail() as that will potentially result in
// spurious messages like 'test failed more than once'.
- _setResult(ERROR, "$description: Test teardown failed: ${e.error}",
- e.stackTrace.toString());
+ _setResult(ERROR, "$description: Test teardown failed: ${error}",
+ trace == null ? "" : trace.toString());
_notifyComplete();
});
return;
« no previous file with comments | « pkg/unittest/lib/src/future_matchers.dart ('k') | pkg/webdriver/lib/webdriver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698