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

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

Issue 149573006: pkg/unittest: more lock-down, cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fighting cl Created 6 years, 11 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/spread_args_helper.dart ('k') | 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 50274637aa57ab27a766ee62e5c0b8c5c795b7a8..d4802ea8ce1b6d36ac72afa8621c8471e3ddc095 100644
--- a/pkg/unittest/lib/src/test_case.dart
+++ b/pkg/unittest/lib/src/test_case.dart
@@ -57,7 +57,9 @@ class TestCase {
Duration _runningTime;
Duration get runningTime => _runningTime;
- bool enabled = true;
+ bool _enabled = true;
+
+ bool get enabled => _enabled;
bool _doneTeardown = false;
@@ -76,9 +78,9 @@ class TestCase {
}
if (result == null || result == PASS) {
if (e is TestFailure) {
- fail("$e", stack);
+ _fail("$e", stack);
} else {
- error("$stage failed: Caught $e", stack);
+ _error("$stage failed: Caught $e", stack);
}
}
};
@@ -160,11 +162,11 @@ class TestCase {
}
}
- void pass() {
+ void _pass() {
_complete(PASS);
}
- void fail(String messageText, [StackTrace stack]) {
+ void _fail(String messageText, [StackTrace stack]) {
if (result != null) {
String newMessage = (result == PASS)
? 'Test failed after initially passing: $messageText'
@@ -176,13 +178,13 @@ class TestCase {
}
}
- void error(String messageText, [StackTrace stack]) {
+ void _error(String messageText, [StackTrace stack]) {
_complete(ERROR, messageText, stack);
}
void _markCallbackComplete() {
if (--_callbackFunctionsOutstanding == 0 && !isComplete) {
- pass();
+ _pass();
}
}
« no previous file with comments | « pkg/unittest/lib/src/spread_args_helper.dart ('k') | pkg/unittest/lib/unittest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698