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

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

Issue 8832008: Make test scripts work on Windows again. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 9 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 | « no previous file | no next file » | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Multitests are Dart test scripts containing lines of the form 7 // Multitests are Dart test scripts containing lines of the form
8 // " [some dart code] /// [key]: [error type]" 8 // " [some dart code] /// [key]: [error type]"
9 // 9 //
10 // For each key in the file, a new test file is made containing all 10 // For each key in the file, a new test file is made containing all
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 supportsFatalTypeErrors, 190 supportsFatalTypeErrors,
191 currentKey, 191 currentKey,
192 basePath, 192 basePath,
193 doTest, 193 doTest,
194 done); 194 done);
195 }; 195 };
196 file.create(); 196 file.create();
197 } 197 }
198 198
199 String CreateMultitestDirectory(String buildDir, String testDir) { 199 String CreateMultitestDirectory(String buildDir, String testDir) {
200 final String generatedTestDirectory = 'generated_tests/'; 200 final String generatedTestDirectory = 'generated_tests';
201 Directory parentDir = new Directory(buildDir + generatedTestDirectory); 201 Directory parentDir = new Directory(buildDir + generatedTestDirectory);
202 if (!parentDir.existsSync()) { 202 if (!parentDir.existsSync()) {
203 parentDir.createSync(); 203 parentDir.createSync();
204 } 204 }
205 var split = testDir.split(new Platform().pathSeparator()); 205 var split = testDir.split('/');
206 var lastComponent = split.removeLast(); 206 var lastComponent = split.removeLast();
207 Expect.isTrue(lastComponent == 'src'); 207 Expect.isTrue(lastComponent == 'src');
208 String path = parentDir.path + split.last(); 208 String path = '${parentDir.path}/${split.last()}';
209 Directory dir = new Directory(path); 209 Directory dir = new Directory(path);
210 if (!dir.existsSync()) { 210 if (!dir.existsSync()) {
211 dir.createSync(); 211 dir.createSync();
212 } 212 }
213 return path; 213 return path;
214 } 214 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698