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

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

Issue 9559007: Update test.dart for detection output of machine formatted errors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added diagnostic for @static-clean conflicts Created 8 years, 9 months 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
OLDNEW
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 List<String> output = new List<String>(); 117 List<String> output = new List<String>();
118 output.add(''); 118 output.add('');
119 output.add('FAILED: ${test.configurationString} ${test.displayName}'); 119 output.add('FAILED: ${test.configurationString} ${test.displayName}');
120 StringBuffer expected = new StringBuffer(); 120 StringBuffer expected = new StringBuffer();
121 expected.add('Expected: '); 121 expected.add('Expected: ');
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()) {
128 String prefix = 'diagnostics:';
129 for (var s in test.output.diagnostics) {
130 output.add('$prefix ${s}');
131 prefix = ' ';
132 }
133 }
127 if (!test.output.stdout.isEmpty()) { 134 if (!test.output.stdout.isEmpty()) {
128 output.add(''); 135 output.add('');
129 output.add('stdout:'); 136 output.add('stdout:');
130 for (var s in test.output.stdout) { 137 for (var s in test.output.stdout) {
131 output.add(s); 138 output.add(s);
132 } 139 }
133 } 140 }
134 if (!test.output.stderr.isEmpty()) { 141 if (!test.output.stderr.isEmpty()) {
135 output.add(''); 142 output.add('');
136 output.add('stderr:'); 143 output.add('stderr:');
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 var status = 'pass'; 348 var status = 'pass';
342 if (test.output.unexpectedOutput) { 349 if (test.output.unexpectedOutput) {
343 status = 'fail'; 350 status = 'fail';
344 } 351 }
345 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString(); 352 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString();
346 print('Done ${test.configurationString} ${test.displayName}: $status'); 353 print('Done ${test.configurationString} ${test.displayName}: $status');
347 print('@@@STEP_CLEAR@@@'); 354 print('@@@STEP_CLEAR@@@');
348 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@'); 355 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@');
349 } 356 }
350 } 357 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698