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

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

Issue 17274002: Revert 24086 Update checked in binary to version 0.5.19.0 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 | « tools/testing/dart/http_server.dart ('k') | tools/testing/dart/record_and_replay.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 multitest; 5 library multitest;
6 6
7 import "dart:async"; 7 import "dart:async";
8 import "dart:io"; 8 import "dart:io";
9 import "test_suite.dart"; 9 import "test_suite.dart";
10 import "utils.dart"; 10 import "utils.dart";
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 // Wait until all imports are copied before scheduling test cases. 214 // Wait until all imports are copied before scheduling test cases.
215 return Future.wait(futureCopies).then((_) { 215 return Future.wait(futureCopies).then((_) {
216 String baseFilename = filePath.filenameWithoutExtension; 216 String baseFilename = filePath.filenameWithoutExtension;
217 for (String key in tests.keys) { 217 for (String key in tests.keys) {
218 final Path multitestFilename = 218 final Path multitestFilename =
219 targetDir.append('${baseFilename}_$key.dart'); 219 targetDir.append('${baseFilename}_$key.dart');
220 final File file = new File.fromPath(multitestFilename); 220 final File file = new File.fromPath(multitestFilename);
221 221
222 file.createSync(); 222 file.createSync();
223 RandomAccessFile openedFile = file.openSync(mode: FileMode.WRITE); 223 RandomAccessFile openedFile = file.openSync(FileMode.WRITE);
224 openedFile.writeStringSync(tests[key]); 224 openedFile.writeStringSync(tests[key]);
225 openedFile.closeSync(); 225 openedFile.closeSync();
226 Set<String> outcome = outcomes[key]; 226 Set<String> outcome = outcomes[key];
227 bool enableFatalTypeErrors = outcome.contains('static type warning'); 227 bool enableFatalTypeErrors = outcome.contains('static type warning');
228 bool hasRuntimeErrors = outcome.contains('runtime error'); 228 bool hasRuntimeErrors = outcome.contains('runtime error');
229 bool hasCompileError = outcome.contains('compile-time error'); 229 bool hasCompileError = outcome.contains('compile-time error');
230 bool isNegativeIfChecked = outcome.contains('dynamic type error'); 230 bool isNegativeIfChecked = outcome.contains('dynamic type error');
231 doTest(multitestFilename, 231 doTest(multitestFilename,
232 hasCompileError, 232 hasCompileError,
233 hasRuntimeErrors, 233 hasRuntimeErrors,
(...skipping 22 matching lines...) Expand all
256 // TestSuite.forDirectory. 256 // TestSuite.forDirectory.
257 split.removeLast(); 257 split.removeLast();
258 } 258 }
259 String path = '${generatedTestDir.path}/${split.last}'; 259 String path = '${generatedTestDir.path}/${split.last}';
260 Directory dir = new Directory(path); 260 Directory dir = new Directory(path);
261 if (!dir.existsSync()) { 261 if (!dir.existsSync()) {
262 dir.createSync(); 262 dir.createSync();
263 } 263 }
264 return new Path(new File(path).fullPathSync()); 264 return new Path(new File(path).fullPathSync());
265 } 265 }
OLDNEW
« no previous file with comments | « tools/testing/dart/http_server.dart ('k') | tools/testing/dart/record_and_replay.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698