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

Unified Diff: tools/testing/dart/multitest.dart

Issue 12475010: Revert "Update the test runner to use the new dart:io API" again (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/testing/dart/http_server.dart ('k') | tools/testing/dart/status_file_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/multitest.dart
diff --git a/tools/testing/dart/multitest.dart b/tools/testing/dart/multitest.dart
index 44ba7731535caa2ed209bd8a52bad8d174659faa..585502c298e26c49677de6412a03d113da8f2fd9 100644
--- a/tools/testing/dart/multitest.dart
+++ b/tools/testing/dart/multitest.dart
@@ -137,11 +137,12 @@ class _Annotation {
return null;
}
var annotation = new _Annotation();
- var parts = line.split('///')[1].split(':').map((s) => s.trim()).toList();
+ var parts = line.split('///')[1].split(':')
+ .mappedBy((s) => s.trim()).toList();
annotation.key = parts[0];
annotation.rest = parts[1];
annotation.outcomesList = annotation.rest.split(',')
- .map((s) => s.trim()).toList();
+ .mappedBy((s) => s.trim()).toList();
return annotation;
}
}
@@ -150,7 +151,7 @@ class _Annotation {
// the generated tests.
Set<Path> _findAllRelativeImports(Path topLibrary) {
Set<Path> toSearch = new Set<Path>.from([topLibrary]);
- Set<Path> foundImports = new Set<Path>();
+ Set<Path> foundImports = new HashSet<Path>();
Path libraryDir = topLibrary.directoryPath;
// Matches #import( or #source( followed by " or ' followed by anything
// except dart:, dart-ext: or /, at the beginning of a line.
@@ -158,7 +159,7 @@ Set<Path> _findAllRelativeImports(Path topLibrary) {
'^#(import|source)[(]["\'](?!(dart:|dart-ext:|/))([^"\']*)["\']');
while (!toSearch.isEmpty) {
var thisPass = toSearch;
- toSearch = new Set<Path>();
+ toSearch = new HashSet<Path>();
for (Path filename in thisPass) {
File f = new File.fromPath(filename);
for (String line in f.readAsLinesSync()) {
@@ -218,7 +219,8 @@ Future doMultitest(Path filePath, String outputDir, Path suiteDir,
file.createSync();
RandomAccessFile openedFile = file.openSync(FileMode.WRITE);
- openedFile.writeStringSync(tests[key]);
+ var bytes = tests[key].charCodes;
+ openedFile.writeListSync(bytes, 0, bytes.length);
openedFile.closeSync();
Set<String> outcome = outcomes[key];
bool enableFatalTypeErrors = outcome.contains('static type warning');
« no previous file with comments | « tools/testing/dart/http_server.dart ('k') | tools/testing/dart/status_file_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698