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

Unified Diff: pkg/unittest/test_case.dart

Issue 10959074: Make PASS, FAIL, ERROR public (see issue 5365). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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/unittest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/test_case.dart
===================================================================
--- pkg/unittest/test_case.dart (revision 12787)
+++ pkg/unittest/test_case.dart (working copy)
@@ -40,7 +40,7 @@
String message = '';
/**
- * One of [_PASS], [_FAIL], [_ERROR], or [null] if the test hasn't run yet.
+ * One of [PASS], [FAIL], [ERROR], or [null] if the test hasn't run yet.
*/
String result;
@@ -98,19 +98,19 @@
}
void pass() {
- result = _PASS;
+ result = PASS;
_complete();
}
void fail(String messageText, String stack) {
if (result != null) {
- if (result == _PASS) {
+ if (result == PASS) {
error('Test failed after initially passing: $messageText', stack);
- } else if (result == _FAIL) {
+ } else if (result == FAIL) {
error('Test failed more than once: $messageText', stack);
}
} else {
- result = _FAIL;
+ result = FAIL;
message = messageText;
stackTrace = stack;
_complete();
@@ -118,7 +118,7 @@
}
void error(String messageText, String stack) {
- result = _ERROR;
+ result = ERROR;
message = messageText;
stackTrace = stack;
_complete();
« no previous file with comments | « no previous file | pkg/unittest/unittest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698