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

Side by Side Diff: utils/testrunner/utils.dart

Issue 11033042: Change imports etc to new syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 part of testrunner;
6
5 /** 7 /**
6 * Read the contents of a file [fileName] into a [List] of [String]s. 8 * Read the contents of a file [fileName] into a [List] of [String]s.
7 * If the file does not exist and [errorIfNoFile] is true, throw an 9 * If the file does not exist and [errorIfNoFile] is true, throw an
8 * exception, else return an empty list. 10 * exception, else return an empty list.
9 */ 11 */
10 List<String> getFileContents(String filename, bool errorIfNoFile) { 12 List<String> getFileContents(String filename, bool errorIfNoFile) {
11 File f = new File(filename); 13 File f = new File(filename);
12 if (!f.existsSync()) { 14 if (!f.existsSync()) {
13 if (errorIfNoFile) { 15 if (errorIfNoFile) {
14 throw new Exception('Config file $filename not found.'); 16 throw new Exception('Config file $filename not found.');
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 * Get the directory that testrunner lives in; we need it to import 82 * Get the directory that testrunner lives in; we need it to import
81 * support files into the generated scripts. 83 * support files into the generated scripts.
82 */ 84 */
83 85
84 String get runnerDirectory() { 86 String get runnerDirectory() {
85 var libDirectory = makePathAbsolute(new Options().script); 87 var libDirectory = makePathAbsolute(new Options().script);
86 return libDirectory.substring(0, 88 return libDirectory.substring(0,
87 libDirectory.lastIndexOf(Platform.pathSeparator)); 89 libDirectory.lastIndexOf(Platform.pathSeparator));
88 } 90 }
89 91
OLDNEW
« utils/testrunner/testrunner.dart ('K') | « utils/testrunner/testrunner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698