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

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

Issue 9109012: Fix static type warnings in test.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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
« no previous file with comments | « tests/co19/test_config.dart ('k') | tools/testing/dart/test_options.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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 Strings.join(testsAsLines[key], line_separator) + line_separator; 112 Strings.join(testsAsLines[key], line_separator) + line_separator;
113 } 113 }
114 } 114 }
115 115
116 116
117 void DoMultitest(String filename, 117 void DoMultitest(String filename,
118 String outputDir, 118 String outputDir,
119 String testDir, 119 String testDir,
120 Function doTest(String filename, 120 Function doTest(String filename,
121 bool isNegative, 121 bool isNegative,
122 [bool isNegativeIfChecked]), 122 [bool isNegativeIfChecked,
123 bool hasFatalTypeErrors]),
123 Function multitestDone) { 124 Function multitestDone) {
124 // Each new test is a single String value in the Map tests. 125 // Each new test is a single String value in the Map tests.
125 Map<String, String> tests = new Map<String, String>(); 126 Map<String, String> tests = new Map<String, String>();
126 Map<String, String> outcomes = new Map<String, String>(); 127 Map<String, String> outcomes = new Map<String, String>();
127 ExtractTestsFromMultitest(filename, tests, outcomes); 128 ExtractTestsFromMultitest(filename, tests, outcomes);
128 129
129 String directory = CreateMultitestDirectory(outputDir, testDir); 130 String directory = CreateMultitestDirectory(outputDir, testDir);
130 String pathSeparator = new Platform().pathSeparator(); 131 String pathSeparator = new Platform().pathSeparator();
131 int start = filename.lastIndexOf(pathSeparator) + 1; 132 int start = filename.lastIndexOf(pathSeparator) + 1;
132 int end = filename.indexOf('.dart', start); 133 int end = filename.indexOf('.dart', start);
(...skipping 30 matching lines...) Expand all
163 var split = testDir.split('/'); 164 var split = testDir.split('/');
164 var lastComponent = split.removeLast(); 165 var lastComponent = split.removeLast();
165 Expect.isTrue(lastComponent == 'src'); 166 Expect.isTrue(lastComponent == 'src');
166 String path = '${parentDir.path}/${split.last()}'; 167 String path = '${parentDir.path}/${split.last()}';
167 Directory dir = new Directory(path); 168 Directory dir = new Directory(path);
168 if (!dir.existsSync()) { 169 if (!dir.existsSync()) {
169 dir.createSync(); 170 dir.createSync();
170 } 171 }
171 return path; 172 return path;
172 } 173 }
OLDNEW
« no previous file with comments | « tests/co19/test_config.dart ('k') | tools/testing/dart/test_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698