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

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

Issue 13261006: pkg/unittest: cleanup to logMessage (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits? Created 7 years, 9 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/config.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/unittest.dart
diff --git a/pkg/unittest/lib/unittest.dart b/pkg/unittest/lib/unittest.dart
index a0f5ffc3e41f8ee66f41e12c881518197ec52713..9a308ac6a77884d7d0f941ecb71061b77793e158 100644
--- a/pkg/unittest/lib/unittest.dart
+++ b/pkg/unittest/lib/unittest.dart
@@ -185,7 +185,12 @@ void set unittestConfiguration(Configuration value) {
}
}
-void logMessage(String message) => _config.logMessage(message);
+/**
+ * Can be called by tests to log status. Tests should use this
+ * instead of [print].
+ */
+void logMessage(String message) =>
+ _config.onLogMessage(currentTestCase, message);
/**
* Description text of the current test group. If multiple groups are nested,
@@ -785,7 +790,7 @@ void _completeTests() {
case ERROR: errors++; break;
}
}
- _config.onSummary(passed, failed, errors, _testCases, _uncaughtErrorMessage);
+ _config.onSummary(passed, failed, errors, testCases, _uncaughtErrorMessage);
_config.onDone(passed > 0 && failed == 0 && errors == 0 &&
_uncaughtErrorMessage == null);
_initialized = false;
« no previous file with comments | « pkg/unittest/lib/src/config.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698