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

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

Issue 8773006: Fork test scripts to support special runtime checkout. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/tools/
Patch Set: 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 | « test-runtime.dart ('k') | testing/dart/test_progress.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) 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 }; 181 };
182 file.create(); 182 file.create();
183 } 183 }
184 184
185 String CreateMultitestDirectory(String buildDir, String testDir) { 185 String CreateMultitestDirectory(String buildDir, String testDir) {
186 final String generatedTestDirectory = 'generated_tests/'; 186 final String generatedTestDirectory = 'generated_tests/';
187 Directory parent_dir = new Directory(buildDir + generatedTestDirectory); 187 Directory parent_dir = new Directory(buildDir + generatedTestDirectory);
188 if (!parent_dir.existsSync()) { 188 if (!parent_dir.existsSync()) {
189 parent_dir.createSync(); 189 parent_dir.createSync();
190 } 190 }
191 final String prefix = 'tests/'; 191 var split = testDir.split(new Platform().pathSeparator());
192 final String suffix = '/src'; 192 Expect.isTrue(split.removeLast() == 'src');
Bill Hesse 2011/12/01 12:59:34 Even though Expect runs all the time, not like ass
Mads Ager (google) 2011/12/01 13:02:04 Yeah, I probably should remove the last element on
193 Expect.isTrue(testDir.startsWith(prefix)); 193 String path = parent_dir.path + split.last();
194 Expect.isTrue(testDir.endsWith(suffix));
195 String path = parent_dir.path +
196 testDir.substring(prefix.length, testDir.length - suffix.length);
197 Directory dir = new Directory(path); 194 Directory dir = new Directory(path);
198 if (!dir.existsSync()) { 195 if (!dir.existsSync()) {
199 dir.createSync(); 196 dir.createSync();
200 } 197 }
201 return path; 198 return path;
202 } 199 }
200
Bill Hesse 2011/12/01 12:59:34 Trailing blank line.
Mads Ager (google) 2011/12/01 13:02:04 Done.
OLDNEW
« no previous file with comments | « test-runtime.dart ('k') | testing/dart/test_progress.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698