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

Side by Side Diff: testing/dart/test_progress.dart

Issue 8773006: Fork test scripts to support special runtime checkout. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/tools/
Patch Set: '' Created 9 years 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 | « testing/dart/multitest.dart ('k') | testing/dart/test_suite.dart » ('j') | 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 #library("test_progress"); 5 #library("test_progress");
6 6
7 #import("test_runner.dart"); 7 #import("test_runner.dart");
8 8
9 class ProgressIndicator { 9 class ProgressIndicator {
10 ProgressIndicator(this._startTime); 10 ProgressIndicator(this._startTime);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 int _failedTests = 0; 113 int _failedTests = 0;
114 Date _startTime; 114 Date _startTime;
115 } 115 }
116 116
117 117
118 class CompactProgressIndicator extends ProgressIndicator { 118 class CompactProgressIndicator extends ProgressIndicator {
119 CompactProgressIndicator(Date startTime) : super(startTime); 119 CompactProgressIndicator(Date startTime) : super(startTime);
120 120
121 void allDone() { 121 void allDone() {
122 stdout.write('\n'.charCodes()); 122 stdout.write('\n'.charCodes());
123 stdout.close();
123 } 124 }
124 125
125 void _printProgress() { 126 void _printProgress() {
126 var percent = ((_completedTests() / _foundTests) * 100).floor().toString(); 127 var percent = ((_completedTests() / _foundTests) * 100).floor().toString();
127 var percentPadded = _pad(percent, 5); 128 var percentPadded = _pad(percent, 5);
128 var passedPadded = _pad(_passedTests.toString(), 5); 129 var passedPadded = _pad(_passedTests.toString(), 5);
129 var failedPadded = _pad(_failedTests.toString(), 5); 130 var failedPadded = _pad(_failedTests.toString(), 5);
130 var progressLine = 131 var progressLine =
131 '\r[${_timeString()} | $percentPadded% | ' + 132 '\r[${_timeString()} | $percentPadded% | ' +
132 '+$passedPadded | -$failedPadded]'; 133 '+$passedPadded | -$failedPadded]';
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 var status = 'pass'; 209 var status = 'pass';
209 if (test.output.unexpectedOutput) { 210 if (test.output.unexpectedOutput) {
210 status = 'fail'; 211 status = 'fail';
211 } 212 }
212 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString(); 213 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString();
213 print('Done ${test.displayName}: $status'); 214 print('Done ${test.displayName}: $status');
214 print('@@@STEP_CLEAR@@@'); 215 print('@@@STEP_CLEAR@@@');
215 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@'); 216 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@');
216 } 217 }
217 } 218 }
OLDNEW
« no previous file with comments | « testing/dart/multitest.dart ('k') | testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698