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

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

Issue 14266009: pkg/unittest: Included traces in more places (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | pkg/unittest/lib/unittest.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 933fe92817007811de5cf2a49d04becbb85eea78..8e761f6fb9b0207cf79c4ce617b6010419ecc613 100644
--- a/pkg/unittest/lib/src/test_case.dart
+++ b/pkg/unittest/lib/src/test_case.dart
@@ -83,7 +83,10 @@ class TestCase {
--_callbackFunctionsOutstanding;
if (f is Future) {
return f.then((_) => _finishTest())
- .catchError((error) => fail("${error}"));
+ .catchError((error) {
+ var stack = getAttachedStackTrace(error);
+ _registerException(this, error, stack);
+ });
} else {
_finishTest();
return null;
@@ -118,7 +121,8 @@ 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");
+ var stack = getAttachedStackTrace(e);
+ error("$description: Test setup failed: $e", "$stack");
});
} else {
var f = _runTest();
« no previous file with comments | « no previous file | pkg/unittest/lib/unittest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698