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

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

Issue 22859009: Changes to how we handle fancy stacks: (Closed) Base URL: http://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
Index: pkg/unittest/lib/src/test_case.dart
===================================================================
--- pkg/unittest/lib/src/test_case.dart (revision 26205)
+++ pkg/unittest/lib/src/test_case.dart (working copy)
@@ -41,9 +41,9 @@
*/
String get result => _result;
- Trace _stackTrace;
+ String _stackTrace;
/** Stack trace associated with this test, or [null] if it succeeded. */
- Trace get stackTrace => _stackTrace;
+ get stackTrace => _stackTrace;
nweiz 2013/08/15 23:03:25 The getter should also be typed. Now there's no w
gram 2013/08/16 16:56:45 I'm changing it to StackTrace; I wasn't aware that
/** The group (or groups) under which this test is running. */
final String currentGroup;
@@ -132,7 +132,9 @@
// is the first time the result is being set.
void _setResult(String testResult, String messageText, stack) {
nweiz 2013/08/15 23:03:25 [stack] here should be typed as StackTrace.
gram 2013/08/16 16:56:45 Done.
_message = messageText;
- _stackTrace = _getTrace(stack);
+ var trace = _getTrace(stack);
+ if (trace == null) trace = stack;
+ _stackTrace = (trace == null) ? null : trace.toString();
if (result == null) {
_result = testResult;
_config.onTestResult(this);

Powered by Google App Engine
This is Rietveld 408576698