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

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: Minor fixes 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
Index: tools/testing/dart/multitest.dart
diff --git a/tools/testing/dart/multitest.dart b/tools/testing/dart/multitest.dart
index 585502c298e26c49677de6412a03d113da8f2fd9..65dfeef40d1809ff2d0a54e6e624c20563f21598 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,7 +218,7 @@ Future doMultitest(Path filePath, String outputDir, Path suiteDir,
file.createSync();
RandomAccessFile openedFile = file.openSync(FileMode.WRITE);
- var bytes = tests[key].charCodes;
+ var bytes = tests[key].codeUnits;
Bill Hesse 2013/03/13 12:56:41 .codeUnits returns 16-bit code units. Don't we ne
Søren Gjesse 2013/03/13 15:17:18 Used writeStringSync as suggested below. Then read
openedFile.writeListSync(bytes, 0, bytes.length);
Bill Hesse 2013/03/13 12:56:41 writeStringSync?
Søren Gjesse 2013/03/13 15:17:18 Done.
openedFile.closeSync();
Set<String> outcome = outcomes[key];

Powered by Google App Engine
This is Rietveld 408576698