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

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

Issue 18384002: pkg/unittest: no need to expose the errorHandler helper (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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/test_case.dart
diff --git a/pkg/unittest/lib/src/test_case.dart b/pkg/unittest/lib/src/test_case.dart
index 9bf3656924af7ff64be69746a083891b21c57e85..ad5bd6ad8a4b0644a3a9ebfcbb8ffca38f4e75e6 100644
--- a/pkg/unittest/lib/src/test_case.dart
+++ b/pkg/unittest/lib/src/test_case.dart
@@ -67,7 +67,7 @@ class TestCase {
bool get isComplete => !enabled || result != null;
- errorHandler(stage) => (e) {
+ Function _errorHandler(String stage) => (e) {
var stack = getAttachedStackTrace(e);
stack = (stack == null) ? '' : '$stack';
if (result == null || result == PASS) {
@@ -92,7 +92,7 @@ class TestCase {
_message = '';
var f = (setUp == null) ? new Future.value() : new Future(setUp);
- return f.catchError(errorHandler('Setup'))
+ return f.catchError(_errorHandler('Setup'))
.then((_) {
// Skip the test if setup failed.
if (result != null) return new Future.value();
@@ -102,7 +102,7 @@ class TestCase {
++_callbackFunctionsOutstanding;
return testFunction();
})
- .catchError(errorHandler('Test'))
+ .catchError(_errorHandler('Test'))
.then((_) {
_markCallbackComplete();
if (result == null) {
@@ -112,12 +112,12 @@ class TestCase {
if (tearDown != null) {
return tearDown();
}
- }).catchError(errorHandler('Teardown'));
+ }).catchError(_errorHandler('Teardown'));
} else if (tearDown != null) {
return tearDown();
}
})
- .catchError(errorHandler('Teardown'));
+ .catchError(_errorHandler('Teardown'));
}
// Set the results, notify the config, and return true if 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