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

Side by Side Diff: pkg/unittest/lib/src/config.dart

Issue 11887005: Improve compact and default configuration (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/unittest/lib/compact_vm_config.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of unittest; 5 part of unittest;
6 6
7 /** 7 /**
8 * Hooks to configure the unittest library for different platforms. This class 8 * Hooks to configure the unittest library for different platforms. This class
9 * implements the API in a platform-independent way. Tests that want to take 9 * implements the API in a platform-independent way. Tests that want to take
10 * advantage of the platform can create a subclass and override methods from 10 * advantage of the platform can create a subclass and override methods from
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 if (t.stackTrace != null && t.stackTrace != '') { 108 if (t.stackTrace != null && t.stackTrace != '') {
109 print(_indent(t.stackTrace)); 109 print(_indent(t.stackTrace));
110 } 110 }
111 } 111 }
112 112
113 // Show the summary. 113 // Show the summary.
114 print(''); 114 print('');
115 115
116 var success = false; 116 var success = false;
117 if (passed == 0 && failed == 0 && errors == 0) { 117 if (passed == 0 && failed == 0 && errors == 0 && uncaughtError == null) {
118 print('No tests found.'); 118 print('No tests found.');
119 // This is considered a failure too. 119 // This is considered a failure too.
120 } else if (failed == 0 && errors == 0 && uncaughtError == null) { 120 } else if (failed == 0 && errors == 0 && uncaughtError == null) {
121 print('All $passed tests passed.'); 121 print('All $passed tests passed.');
122 success = true; 122 success = true;
123 } else { 123 } else {
124 if (uncaughtError != null) { 124 if (uncaughtError != null) {
125 print('Top-level uncaught error: $uncaughtError'); 125 print('Top-level uncaught error: $uncaughtError');
126 } 126 }
127 print('$passed PASSED, $failed FAILED, $errors ERRORS'); 127 print('$passed PASSED, $failed FAILED, $errors ERRORS');
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // TODO(sigmund): find a way to unify notifyController and _postMessage 169 // TODO(sigmund): find a way to unify notifyController and _postMessage
170 void notifyController(String message) { 170 void notifyController(String message) {
171 } 171 }
172 172
173 _postMessage(String message) { 173 _postMessage(String message) {
174 // In dart2js browser tests, the JavaScript-based test controller 174 // In dart2js browser tests, the JavaScript-based test controller
175 // intercepts calls to print and listens for "secret" messages. 175 // intercepts calls to print and listens for "secret" messages.
176 print(message); 176 print(message);
177 } 177 }
178 } 178 }
OLDNEW
« no previous file with comments | « pkg/unittest/lib/compact_vm_config.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698