Index: tests/compiler/dart2js/dart2js_batch2_test.dart |
diff --git a/tests/compiler/dart2js/dart2js_batch2_test.dart b/tests/compiler/dart2js/dart2js_batch2_test.dart |
index 2bd2495947c5780ac99aadb0d7af262e08923607..9aeec1d52cae2a4e3d150c972abe6197c56c28bc 100644 |
--- a/tests/compiler/dart2js/dart2js_batch2_test.dart |
+++ b/tests/compiler/dart2js/dart2js_batch2_test.dart |
@@ -14,8 +14,8 @@ var tmpDir; |
copyDirectory(Directory sourceDir, Directory destinationDir) { |
sourceDir.listSync().forEach((FileSystemEntity element) { |
- String newPath = path.join(destinationDir.path, |
- path.basename(element.path)); |
+ String newPath = |
+ path.join(destinationDir.path, path.basename(element.path)); |
if (element is File) { |
element.copySync(newPath); |
} else if (element is Directory) { |
@@ -51,9 +51,8 @@ void cleanUp() { |
Future launchDart2Js(_) { |
String ext = Platform.isWindows ? '.bat' : ''; |
- String command = |
- path.normalize(path.join(path.fromUri(Platform.script), |
- '../../../../sdk/bin/dart2js${ext}')); |
+ String command = path.normalize(path.join( |
+ path.fromUri(Platform.script), '../../../../sdk/bin/dart2js${ext}')); |
print("Running '$command --batch' from '${tmpDir}'."); |
return Process.start(command, ['--batch'], workingDirectory: tmpDir.path); |
} |
@@ -66,21 +65,17 @@ Future runTests(Process process) { |
process.stdin.close(); |
Future<String> output = process.stdout.transform(UTF8.decoder).join(); |
Future<String> errorOut = process.stderr.transform(UTF8.decoder).join(); |
- return Future.wait([output, errorOut]) |
- .then((result) { |
- String stdoutOutput = result[0]; |
- String stderrOutput = result[1]; |
+ return Future.wait([output, errorOut]).then((result) { |
+ String stdoutOutput = result[0]; |
+ String stderrOutput = result[1]; |
- Expect.isFalse(stdoutOutput.contains("crashed")); |
- }); |
+ Expect.isFalse(stdoutOutput.contains("crashed")); |
+ }); |
} |
void main() { |
var tmpDir; |
asyncTest(() { |
- return setup() |
- .then(launchDart2Js) |
- .then(runTests) |
- .whenComplete(cleanUp); |
+ return setup().then(launchDart2Js).then(runTests).whenComplete(cleanUp); |
}); |
} |