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

Side by Side Diff: tests/corelib/test_config.dart

Issue 8537010: Enable frong testing components. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 | tests/standalone/test_config.dart » ('j') | tools/testing/dart/test_runner.dart » ('J')
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("corelib_test_config"); 5 #library("corelib_test_config");
6 6
7 #import("../../tools/testing/dart/test_runner.dart"); 7 #import("../../tools/testing/dart/test_runner.dart");
8 #import("../../tools/testing/dart/status_file_parser.dart"); 8 #import("../../tools/testing/dart/status_file_parser.dart");
9 9
10 class CorelibTestSuite { 10 class CorelibTestSuite {
11 String directoryPath = "tests/corelib/src"; 11 String directoryPath = "tests/corelib/src";
12 final String statusFilePath = "tests/corelib/corelib.status"; 12 final String statusFilePath = "tests/corelib/corelib.status";
13 Function doTest; 13 Function doTest;
14 Function doDone; 14 Function doDone;
15 String shellPath; 15 String shellPath;
16 String pathSeparator; 16 String pathSeparator;
17 Map configuration; 17 Map configuration;
18 TestExpectationsMap testExpectationsMap; 18 TestExpectationsMap testExpectationsMap;
19 19
20 CorelibTestSuite(Map this.configuration) { 20 CorelibTestSuite(Map this.configuration) {
21 shellPath = getDartShellFileName(configuration) ; 21 shellPath = getDartShellFileName(configuration) ;
22 pathSeparator = new Platform().pathSeparator(); 22 pathSeparator = new Platform().pathSeparator();
23 } 23 }
24 24
25 void forEachTest(Function onTest, [Function onDone = null]) { 25 void forEachTest(Function onTest, [Function onDone = null]) {
26 doTest = onTest; 26 doTest = onTest;
27 doDone = onDone; 27 doDone = (ignore) => onDone();
28 28
29 // Read test expectations from status file. 29 // Read test expectations from status file.
30 testExpectationsMap = ReadTestExpectations(statusFilePath, configuration); 30 testExpectationsMap = ReadTestExpectations(statusFilePath, configuration);
31 31
32 processDirectory(); 32 processDirectory();
33 } 33 }
34 34
35 void processDirectory() { 35 void processDirectory() {
36 directoryPath = getDirname(directoryPath); 36 directoryPath = getDirname(directoryPath);
37 Directory dir = new Directory(directoryPath); 37 Directory dir = new Directory(directoryPath);
(...skipping 11 matching lines...) Expand all
49 int start = filename.lastIndexOf(pathSeparator); 49 int start = filename.lastIndexOf(pathSeparator);
50 String testName = filename.substring(start + 1, filename.length - 5); 50 String testName = filename.substring(start + 1, filename.length - 5);
51 Set<String> expectations = testExpectationsMap.expectations(testName); 51 Set<String> expectations = testExpectationsMap.expectations(testName);
52 52
53 // TODO(whesse): Skip files with internal directives, and multipart files, 53 // TODO(whesse): Skip files with internal directives, and multipart files,
54 // until they are handled correctly. 54 // until they are handled correctly.
55 if (expectations.contains(SKIP)) return; 55 if (expectations.contains(SKIP)) return;
56 56
57 List args = ["--ignore-unrecognized-flags"]; 57 List args = ["--ignore-unrecognized-flags"];
58 if (configuration["checked"]) { 58 if (configuration["checked"]) {
59 args.add("--enable-type-checks"); 59 args.add("--enable_type_checks");
60 }
61 if (configuration["component"] == "leg") {
62 args.add("--enable_leg");
60 } 63 }
61 args.add(filename); 64 args.add(filename);
62 65
63 doTest(new TestCase(testName, 66 doTest(new TestCase(testName,
64 shellPath, 67 shellPath,
65 args, 68 args,
69 configuration["timeout"],
66 completeHandler, 70 completeHandler,
67 expectations)); 71 expectations));
68 } 72 }
69 73
70 void completeHandler(TestCase testCase) { 74 void completeHandler(TestCase testCase) {
71 } 75 }
72 } 76 }
OLDNEW
« no previous file with comments | « no previous file | tests/standalone/test_config.dart » ('j') | tools/testing/dart/test_runner.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698