| OLD | NEW |
| 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 #import("test_suite.dart"); | 8 #import("test_suite.dart"); |
| 9 | 9 |
| 10 class ProgressIndicator { | 10 class ProgressIndicator { |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 if (test.output.unexpectedOutput) { | 232 if (test.output.unexpectedOutput) { |
| 233 status = 'fail'; | 233 status = 'fail'; |
| 234 } | 234 } |
| 235 print('Done ${test.displayName}: $status'); | 235 print('Done ${test.displayName}: $status'); |
| 236 } | 236 } |
| 237 } | 237 } |
| 238 | 238 |
| 239 | 239 |
| 240 class VerboseProgressIndicator extends ProgressIndicator { | 240 class VerboseProgressIndicator extends ProgressIndicator { |
| 241 VerboseProgressIndicator(Date startTime, bool printTiming) | 241 VerboseProgressIndicator(Date startTime, bool printTiming) |
| 242 : super(startTime, bool printTiming); | 242 : super(startTime, printTiming); |
| 243 | 243 |
| 244 void _printStartProgress(TestCase test) { | 244 void _printStartProgress(TestCase test) { |
| 245 print('Starting ${test.displayName}...'); | 245 print('Starting ${test.displayName}...'); |
| 246 } | 246 } |
| 247 | 247 |
| 248 void _printDoneProgress(TestCase test) { | 248 void _printDoneProgress(TestCase test) { |
| 249 var status = 'pass'; | 249 var status = 'pass'; |
| 250 if (test.output.unexpectedOutput) { | 250 if (test.output.unexpectedOutput) { |
| 251 status = 'fail'; | 251 status = 'fail'; |
| 252 } | 252 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 278 var status = 'pass'; | 278 var status = 'pass'; |
| 279 if (test.output.unexpectedOutput) { | 279 if (test.output.unexpectedOutput) { |
| 280 status = 'fail'; | 280 status = 'fail'; |
| 281 } | 281 } |
| 282 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString(); | 282 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString(); |
| 283 print('Done ${test.displayName}: $status'); | 283 print('Done ${test.displayName}: $status'); |
| 284 print('@@@STEP_CLEAR@@@'); | 284 print('@@@STEP_CLEAR@@@'); |
| 285 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@'); | 285 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@'); |
| 286 } | 286 } |
| 287 } | 287 } |
| OLD | NEW |