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

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

Issue 247223009: Reduce test.dart memory usage (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | tools/testing/dart/test_runner.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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:async"; 7 import "dart:async";
8 import "dart:io"; 8 import "dart:io";
9 import "dart:io" as io; 9 import "dart:io" as io;
10 import "dart:convert" show JSON; 10 import "dart:convert" show JSON;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 output.add(''); 72 output.add('');
73 output.add(formatter.failed('FAILED: ${test.configurationString}' 73 output.add(formatter.failed('FAILED: ${test.configurationString}'
74 ' ${test.displayName}')); 74 ' ${test.displayName}'));
75 StringBuffer expected = new StringBuffer(); 75 StringBuffer expected = new StringBuffer();
76 expected.write('Expected: '); 76 expected.write('Expected: ');
77 for (var expectation in test.expectedOutcomes) { 77 for (var expectation in test.expectedOutcomes) {
78 expected.write('$expectation '); 78 expected.write('$expectation ');
79 } 79 }
80 output.add(expected.toString()); 80 output.add(expected.toString());
81 output.add('Actual: ${test.result}'); 81 output.add('Actual: ${test.result}');
82 if (!test.lastCommandOutput.hasTimedOut && test.info != null) { 82 if (!test.lastCommandOutput.hasTimedOut) {
83 if (test.commandOutputs.length != test.commands.length 83 if (test.commandOutputs.length != test.commands.length
84 && !test.expectCompileError) { 84 && !test.expectCompileError) {
Bill Hesse 2014/04/23 17:38:44 This is the one case who's semantics is changed -
85 output.add('Unexpected compile-time error.'); 85 output.add('Unexpected compile-time error.');
86 } else { 86 } else {
87 if (test.expectCompileError) { 87 if (test.expectCompileError) {
88 output.add('Compile-time error expected.'); 88 output.add('Compile-time error expected.');
89 } 89 }
90 if (test.info.hasRuntimeError) { 90 if (test.hasRuntimeError) {
91 output.add('Runtime error expected.'); 91 output.add('Runtime error expected.');
92 } 92 }
93 if (test.configuration['checked'] && test.info.isNegativeIfChecked) { 93 if (test.configuration['checked'] && test.isNegativeIfChecked) {
94 output.add('Dynamic type error expected.'); 94 output.add('Dynamic type error expected.');
95 } 95 }
96 } 96 }
97 } 97 }
98 for (var i = 0; i < test.commands.length; i++) { 98 for (var i = 0; i < test.commands.length; i++) {
99 var command = test.commands[i]; 99 var command = test.commands[i];
100 var commandOutput = test.commandOutputs[command]; 100 var commandOutput = test.commandOutputs[command];
101 if (commandOutput != null) { 101 if (commandOutput != null) {
102 output.add("CommandOutput[${command.displayName}]:"); 102 output.add("CommandOutput[${command.displayName}]:");
103 if (!commandOutput.diagnostics.isEmpty) { 103 if (!commandOutput.diagnostics.isEmpty) {
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 return new VerboseProgressIndicator(startTime); 661 return new VerboseProgressIndicator(startTime);
662 case 'status': 662 case 'status':
663 return new ProgressIndicator(startTime); 663 return new ProgressIndicator(startTime);
664 case 'buildbot': 664 case 'buildbot':
665 return new BuildbotProgressIndicator(startTime); 665 return new BuildbotProgressIndicator(startTime);
666 default: 666 default:
667 assert(false); 667 assert(false);
668 break; 668 break;
669 } 669 }
670 } 670 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | tools/testing/dart/test_runner.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698