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

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

Issue 12417004: Update the test runner to use the new dart:io API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased to r19938 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 585502c298e26c49677de6412a03d113da8f2fd9..44ba7731535caa2ed209bd8a52bad8d174659faa 100644
--- a/tools/testing/dart/multitest.dart
+++ b/tools/testing/dart/multitest.dart
@@ -137,12 +137,11 @@ class _Annotation {
return null;
}
var annotation = new _Annotation();
- var parts = line.split('///')[1].split(':')
- .mappedBy((s) => s.trim()).toList();
+ var parts = line.split('///')[1].split(':').map((s) => s.trim()).toList();
annotation.key = parts[0];
annotation.rest = parts[1];
annotation.outcomesList = annotation.rest.split(',')
- .mappedBy((s) => s.trim()).toList();
+ .map((s) => s.trim()).toList();
return annotation;
}
}
@@ -151,7 +150,7 @@ class _Annotation {
// the generated tests.
Set<Path> _findAllRelativeImports(Path topLibrary) {
Set<Path> toSearch = new Set<Path>.from([topLibrary]);
- Set<Path> foundImports = new HashSet<Path>();
+ Set<Path> foundImports = new Set<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.
@@ -159,7 +158,7 @@ Set<Path> _findAllRelativeImports(Path topLibrary) {
'^#(import|source)[(]["\'](?!(dart:|dart-ext:|/))([^"\']*)["\']');
while (!toSearch.isEmpty) {
var thisPass = toSearch;
- toSearch = new HashSet<Path>();
+ toSearch = new Set<Path>();
for (Path filename in thisPass) {
File f = new File.fromPath(filename);
for (String line in f.readAsLinesSync()) {
@@ -219,8 +218,7 @@ Future doMultitest(Path filePath, String outputDir, Path suiteDir,
file.createSync();
RandomAccessFile openedFile = file.openSync(FileMode.WRITE);
- var bytes = tests[key].charCodes;
- openedFile.writeListSync(bytes, 0, bytes.length);
+ openedFile.writeStringSync(tests[key]);
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