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

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

Issue 748773004: tools/testing: move code into individual libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/legacy_path.dart ('k') | tools/testing/dart/path.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
10 import "path.dart";
9 import "test_suite.dart"; 11 import "test_suite.dart";
10 import "utils.dart"; 12 import "utils.dart";
11 13
12 // Multitests are Dart test scripts containing lines of the form 14 // Multitests are Dart test scripts containing lines of the form
13 // " [some dart code] /// [key]: [error type]" 15 // " [some dart code] /// [key]: [error type]"
14 // 16 //
15 // For each key in the file, a new test file is made containing all 17 // For each key in the file, a new test file is made containing all
16 // the normal lines of the file, and all of the multitest lines containing 18 // the normal lines of the file, and all of the multitest lines containing
17 // that key, in the same order as in the source file. The new test is expected 19 // that key, in the same order as in the source file. The new test is expected
18 // to pass if the error type listed is 'ok', or to fail if there is an error 20 // to pass if the error type listed is 'ok', or to fail if there is an error
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // TestSuite.forDirectory. 298 // TestSuite.forDirectory.
297 split.removeLast(); 299 split.removeLast();
298 } 300 }
299 String path = '${generatedTestDir.path}/${split.last}'; 301 String path = '${generatedTestDir.path}/${split.last}';
300 Directory dir = new Directory(path); 302 Directory dir = new Directory(path);
301 if (!dir.existsSync()) { 303 if (!dir.existsSync()) {
302 dir.createSync(); 304 dir.createSync();
303 } 305 }
304 return new Path(new File(path).absolute.path); 306 return new Path(new File(path).absolute.path);
305 } 307 }
OLDNEW
« no previous file with comments | « tools/testing/dart/legacy_path.dart ('k') | tools/testing/dart/path.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698