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

Unified Diff: test/codegen_test.dart

Issue 985933004: Do cleanup instead of excluding runtime files in diff (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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 | « .gitignore ('k') | test/test.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen_test.dart
diff --git a/test/codegen_test.dart b/test/codegen_test.dart
index e80dcbdc5b23d23c479498340f73d1cd2dda9558..dbe68ca7d783ff8a668fec14e9cc937f26f26ea1 100644
--- a/test/codegen_test.dart
+++ b/test/codegen_test.dart
@@ -151,9 +151,32 @@ main(arguments) {
new File(path.join(actualDir, 'html_input.txt'))
.writeAsStringSync(compilerMessages.toString());
- var outFile = new File(path.join(actualDir, 'html_input.html'));
- expect(outFile.existsSync(), success,
- reason: '${outFile.path} was created iff compilation succeeds');
+ var expectedFiles = [
+ 'html_input.html',
+ 'dir/html_input_a.js',
+ 'dir/html_input_b.js',
+ 'dir/html_input_c.js',
+ 'dir/html_input_d.js',
+ 'dir/html_input_e.js',
+ 'dev_compiler/runtime/dart_core.js',
+ 'dev_compiler/runtime/dart_runtime.js',
+ 'dev_compiler/runtime/harmony_feature_check.js',
+ ];
+ for (var filepath in expectedFiles) {
+ var outFile = new File(path.join(actualDir, filepath));
+ expect(outFile.existsSync(), success,
+ reason: '${outFile.path} was created iff compilation succeeds');
+ }
+
+ var notExpectedFiles = [
+ 'dev_compiler/runtime/messages_widget.js',
+ 'dev_compiler/runtime/messages.css'
+ ];
+ for (var filepath in notExpectedFiles) {
+ var outFile = new File(path.join(actualDir, filepath));
+ expect(outFile.existsSync(), isFalse,
+ reason: '${outFile.path} should only be generated in server mode');
+ }
});
test('devc jscodegen html_input.html server mode', () {
@@ -167,10 +190,24 @@ main(arguments) {
new File(path.join(actualDir, 'server_mode', 'html_input.txt'))
.writeAsStringSync(compilerMessages.toString());
- var outFile =
- new File(path.join(actualDir, 'server_mode', 'html_input.html'));
- expect(outFile.existsSync(), success,
- reason: '${outFile.path} was created iff compilation succeeds');
+ var expectedFiles = [
+ 'html_input.html',
+ 'dir/html_input_a.js',
+ 'dir/html_input_b.js',
+ 'dir/html_input_c.js',
+ 'dir/html_input_d.js',
+ 'dir/html_input_e.js',
+ 'dev_compiler/runtime/dart_core.js',
+ 'dev_compiler/runtime/dart_runtime.js',
+ 'dev_compiler/runtime/harmony_feature_check.js',
+ 'dev_compiler/runtime/messages_widget.js',
+ 'dev_compiler/runtime/messages.css'
+ ];
+ for (var filepath in expectedFiles) {
+ var outFile = new File(path.join(actualDir, 'server_mode', filepath));
+ expect(outFile.existsSync(), success,
+ reason: '${outFile.path} was created iff compilation succeeds');
+ }
});
}
}
« no previous file with comments | « .gitignore ('k') | test/test.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698