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/test_suite.dart

Issue 8747018: Add the frog test suites to the dart test scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 | « tools/test.dart ('k') | 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("test_suite"); 5 #library("test_suite");
6 6
7 #import("status_file_parser.dart"); 7 #import("status_file_parser.dart");
8 #import("test_runner.dart"); 8 #import("test_runner.dart");
9 #import("multitest.dart"); 9 #import("multitest.dart");
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 shellPath = TestUtils.dartShellFileName(configuration) ; 137 shellPath = TestUtils.dartShellFileName(configuration) ;
138 } 138 }
139 139
140 140
141 void isTestFile(String filename) => filename.endsWith("Test.dart"); 141 void isTestFile(String filename) => filename.endsWith("Test.dart");
142 142
143 void listRecursively() => false; 143 void listRecursively() => false;
144 144
145 void complexStatusMatching() => false; 145 void complexStatusMatching() => false;
146 146
147 List<String> additionalOptions() => [];
148
147 void forEachTest(Function onTest, [Function onDone = null]) { 149 void forEachTest(Function onTest, [Function onDone = null]) {
148 doTest = onTest; 150 doTest = onTest;
149 doDone = (ignore) => (onDone != null) ? onDone() : null; 151 doDone = (ignore) => (onDone != null) ? onDone() : null;
150 152
151 // Read test expectations from status files. 153 // Read test expectations from status files.
152 testExpectations = 154 testExpectations =
153 new TestExpectations(complexMatching: complexStatusMatching()); 155 new TestExpectations(complexMatching: complexStatusMatching());
154 for (var statusFilePath in statusFilePaths) { 156 for (var statusFilePath in statusFilePaths) {
155 ReadTestExpectationsInto(testExpectations, 157 ReadTestExpectationsInto(testExpectations,
156 statusFilePath, 158 statusFilePath,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 if (optionsFromFile['isMultitest']) { 226 if (optionsFromFile['isMultitest']) {
225 DoMultitest(filename, createTestCase); 227 DoMultitest(filename, createTestCase);
226 } else { 228 } else {
227 createTestCase(filename, optionsFromFile['isNegative']); 229 createTestCase(filename, optionsFromFile['isNegative']);
228 } 230 }
229 } 231 }
230 232
231 void completeHandler(TestCase testCase) { 233 void completeHandler(TestCase testCase) {
232 } 234 }
233 235
234
235 List<List<String>> argumentListsFromFile(String filename, 236 List<List<String>> argumentListsFromFile(String filename,
236 Map optionsFromFile) { 237 Map optionsFromFile) {
237 List args = TestUtils.standardOptions(configuration); 238 List args = TestUtils.standardOptions(configuration);
239 args.addAll(additionalOptions());
238 240
239 bool isMultitest = optionsFromFile["isMultitest"]; 241 bool isMultitest = optionsFromFile["isMultitest"];
240 List<String> dartOptions = optionsFromFile["dartOptions"]; 242 List<String> dartOptions = optionsFromFile["dartOptions"];
241 List<List<String>> vmOptionsList = optionsFromFile["vmOptions"]; 243 List<List<String>> vmOptionsList = optionsFromFile["vmOptions"];
242 Expect.isTrue(!isMultitest || dartOptions == null); 244 Expect.isTrue(!isMultitest || dartOptions == null);
243 args.addAll(dartOptions == null ? [filename] : dartOptions); 245 args.addAll(dartOptions == null ? [filename] : dartOptions);
244 246
245 var result = new List<List<String>>(); 247 var result = new List<List<String>>();
246 Expect.isFalse(vmOptionsList.isEmpty(), "empty vmOptionsList"); 248 Expect.isFalse(vmOptionsList.isEmpty(), "empty vmOptionsList");
247 for (var vmOptions in vmOptionsList) { 249 for (var vmOptions in vmOptionsList) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 args.add("--enable_leg"); 365 args.add("--enable_leg");
364 } 366 }
365 if (configuration["component"] == "dartc") { 367 if (configuration["component"] == "dartc") {
366 if (configuration["mode"] == "release") { 368 if (configuration["mode"] == "release") {
367 args.add("--optimize"); 369 args.add("--optimize");
368 } 370 }
369 } 371 }
370 return args; 372 return args;
371 } 373 }
372 } 374 }
OLDNEW
« no previous file with comments | « tools/test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698