| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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("dart:io"); | 7 #import("dart:io"); |
| 8 #import("test_runner.dart"); | 8 #import("test_runner.dart"); |
| 9 #import("test_suite.dart"); | 9 #import("test_suite.dart"); |
| 10 | 10 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 print('=== All tests succeeded'); | 170 print('=== All tests succeeded'); |
| 171 print('===\n'); | 171 print('===\n'); |
| 172 } else { | 172 } else { |
| 173 var pluralSuffix = _failedTests != 1 ? 's' : ''; | 173 var pluralSuffix = _failedTests != 1 ? 's' : ''; |
| 174 print('\n==='); | 174 print('\n==='); |
| 175 print('=== ${_failedTests} test$pluralSuffix failed'); | 175 print('=== ${_failedTests} test$pluralSuffix failed'); |
| 176 print('===\n'); | 176 print('===\n'); |
| 177 } | 177 } |
| 178 } | 178 } |
| 179 | 179 |
| 180 int get numFailedTests() => _failedTests; | 180 int get numFailedTests => _failedTests; |
| 181 | 181 |
| 182 int _completedTests() => _passedTests + _failedTests; | 182 int _completedTests() => _passedTests + _failedTests; |
| 183 | 183 |
| 184 int _foundTests = 0; | 184 int _foundTests = 0; |
| 185 int _passedTests = 0; | 185 int _passedTests = 0; |
| 186 int _failedTests = 0; | 186 int _failedTests = 0; |
| 187 bool _allTestsKnown = false; | 187 bool _allTestsKnown = false; |
| 188 Date _startTime; | 188 Date _startTime; |
| 189 bool _printTiming; | 189 bool _printTiming; |
| 190 List<TestCase> _tests; | 190 List<TestCase> _tests; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 // printed by the program invoking this. | 365 // printed by the program invoking this. |
| 366 // TODO(ahe): Pass in the step name as an option, and let | 366 // TODO(ahe): Pass in the step name as an option, and let |
| 367 // test.py take care of printing the steps. | 367 // test.py take care of printing the steps. |
| 368 var name = 'failures ($_startTime)'; | 368 var name = 'failures ($_startTime)'; |
| 369 print('@@@STEP_FAILURE@@@'); | 369 print('@@@STEP_FAILURE@@@'); |
| 370 print('@@@BUILD_STEP $name@@@'); | 370 print('@@@BUILD_STEP $name@@@'); |
| 371 } | 371 } |
| 372 super._printFailureSummary(); | 372 super._printFailureSummary(); |
| 373 } | 373 } |
| 374 } | 374 } |
| OLD | NEW |