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

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

Issue 923103003: Avoid spurious "The compiler crashed" messages in batch mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix indentation. Created 5 years, 10 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 | « tests/compiler/dart2js/dart2js_batch2_run.dart ('k') | tests/compiler/dart2js/dart2js_batch_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/dart2js_batch2_test.dart
diff --git a/tests/compiler/dart2js/dart2js_batch_test.dart b/tests/compiler/dart2js/dart2js_batch2_test.dart
similarity index 71%
copy from tests/compiler/dart2js/dart2js_batch_test.dart
copy to tests/compiler/dart2js/dart2js_batch2_test.dart
index 8afe9e981dd7831555d73445e8adf01d5991ec3a..d2a1845614b6413462ad9401cd97dc128608bd0b 100644
--- a/tests/compiler/dart2js/dart2js_batch_test.dart
+++ b/tests/compiler/dart2js/dart2js_batch2_test.dart
@@ -37,11 +37,10 @@ Future<Directory> createTempDir() {
Future setup() {
return createTempDir().then((Directory directory) {
tmpDir = directory;
- Directory sunflowerDir = new Directory.fromUri(
- Platform.script.resolve('../../../third_party/sunflower'));
-
- print("Copying '${sunflowerDir.path}' to '${tmpDir.path}'.");
- copyDirectory(sunflowerDir, tmpDir);
+ String newPath = path.join(directory.path, "dart2js_batch2_run.dart");
+ File source =
+ new File(Platform.script.resolve("dart2js_batch2_run.dart").path);
+ source.copySync(newPath);
});
}
@@ -60,30 +59,19 @@ Future launchDart2Js(_) {
}
Future runTests(Process process) {
- String inFile = path.join(tmpDir.path, 'web/sunflower.dart');
+ String inFile = path.join(tmpDir.path, 'dart2js_batch2_run.dart');
String outFile = path.join(tmpDir.path, 'out.js');
- String outFile2 = path.join(tmpDir.path, 'out2.js');
process.stdin.writeln('--out="$outFile" "$inFile"');
- process.stdin.writeln('--out="$outFile2" "$inFile"');
- process.stdin.writeln('too many arguments');
- process.stdin.writeln(r'"non existing file.dart"');
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];
- print('out:\n$stdoutOutput');
String stderrOutput = result[1];
- print('err:\n$stderrOutput');
-
- Expect.equals(4, ">>> EOF STDERR".allMatches(stderrOutput).length);
- Expect.equals(4, ">>>".allMatches(stderrOutput).length);
- Expect.equals(2, ">>> TEST OK".allMatches(stdoutOutput).length);
- Expect.equals(2, ">>> TEST FAIL".allMatches(stdoutOutput).length);
- Expect.equals(4, ">>>".allMatches(stdoutOutput).length);
+ Expect.isFalse(stdoutOutput.contains("crashed"));
});
}
« no previous file with comments | « tests/compiler/dart2js/dart2js_batch2_run.dart ('k') | tests/compiler/dart2js/dart2js_batch_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698