| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 for (var expectation in test.expectedOutcomes) { | 122 for (var expectation in test.expectedOutcomes) { |
| 123 expected.add('$expectation '); | 123 expected.add('$expectation '); |
| 124 } | 124 } |
| 125 output.add(expected.toString()); | 125 output.add(expected.toString()); |
| 126 output.add('Actual: ${test.output.result}'); | 126 output.add('Actual: ${test.output.result}'); |
| 127 if (!test.output.diagnostics.isEmpty()) { | 127 if (!test.output.diagnostics.isEmpty()) { |
| 128 String prefix = 'diagnostics:'; | 128 String prefix = 'diagnostics:'; |
| 129 for (var s in test.output.diagnostics) { | 129 for (var s in test.output.diagnostics) { |
| 130 output.add('$prefix ${s}'); | 130 output.add('$prefix ${s}'); |
| 131 prefix = ' '; | 131 prefix = ' '; |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 if (!test.output.stdout.isEmpty()) { | 134 if (!test.output.stdout.isEmpty()) { |
| 135 output.add(''); | 135 output.add(''); |
| 136 output.add('stdout:'); | 136 output.add('stdout:'); |
| 137 for (var s in test.output.stdout) { | 137 for (var s in test.output.stdout) { |
| 138 output.add(s); | 138 output.add(s); |
| 139 } | 139 } |
| 140 } | 140 } |
| 141 if (!test.output.stderr.isEmpty()) { | 141 if (!test.output.stderr.isEmpty()) { |
| 142 output.add(''); | 142 output.add(''); |
| 143 output.add('stderr:'); | 143 output.add('stderr:'); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 var status = 'pass'; | 348 var status = 'pass'; |
| 349 if (test.output.unexpectedOutput) { | 349 if (test.output.unexpectedOutput) { |
| 350 status = 'fail'; | 350 status = 'fail'; |
| 351 } | 351 } |
| 352 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString(); | 352 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString(); |
| 353 print('Done ${test.configurationString} ${test.displayName}: $status'); | 353 print('Done ${test.configurationString} ${test.displayName}: $status'); |
| 354 print('@@@STEP_CLEAR@@@'); | 354 print('@@@STEP_CLEAR@@@'); |
| 355 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@'); | 355 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@'); |
| 356 } | 356 } |
| 357 } | 357 } |
| OLD | NEW |