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("dart:builtin"); | 8 #import("dart:builtin"); |
9 #import("test_runner.dart"); | 9 #import("test_runner.dart"); |
10 #import("test_suite.dart"); | 10 #import("test_suite.dart"); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 } | 79 } |
80 } | 80 } |
81 | 81 |
82 void allDone() { | 82 void allDone() { |
83 _printFailureSummary(); | 83 _printFailureSummary(); |
84 _printStatus(); | 84 _printStatus(); |
85 _printTimingInformation(); | 85 _printTimingInformation(); |
86 exit(_failedTests > 0 ? 1 : 0); | 86 exit(_failedTests > 0 ? 1 : 0); |
87 } | 87 } |
88 | 88 |
89 abstract _printStartProgress(TestCase test); | 89 void _printStartProgress(TestCase test) {} |
90 abstract _printDoneProgress(TestCase test); | 90 void _printDoneProgress(TestCase test) {} |
91 | 91 |
92 String _pad(String s, int length) { | 92 String _pad(String s, int length) { |
93 StringBuffer buffer = new StringBuffer(); | 93 StringBuffer buffer = new StringBuffer(); |
94 for (int i = s.length; i < length; i++) { | 94 for (int i = s.length; i < length; i++) { |
95 buffer.add(' '); | 95 buffer.add(' '); |
96 } | 96 } |
97 buffer.add(s); | 97 buffer.add(s); |
98 return buffer.toString(); | 98 return buffer.toString(); |
99 } | 99 } |
100 | 100 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 var status = 'pass'; | 351 var status = 'pass'; |
352 if (test.output.unexpectedOutput) { | 352 if (test.output.unexpectedOutput) { |
353 status = 'fail'; | 353 status = 'fail'; |
354 } | 354 } |
355 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString(); | 355 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString(); |
356 print('Done ${test.configurationString} ${test.displayName}: $status'); | 356 print('Done ${test.configurationString} ${test.displayName}: $status'); |
357 print('@@@STEP_CLEAR@@@'); | 357 print('@@@STEP_CLEAR@@@'); |
358 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@'); | 358 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@'); |
359 } | 359 } |
360 } | 360 } |
OLD | NEW |