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

Unified Diff: tests/compiler/dart2js/dart2js_batch2_test.dart

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 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: 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);
});
}
« no previous file with comments | « tests/compiler/dart2js/container_mask_equal_test.dart ('k') | tests/compiler/dart2js/dart2js_batch_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698