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

Unified Diff: pkg/analysis_server/tool/spec/codegen_matchers.dart

Issue 469543002: Add a test to verify that analysis server code generation is up to date. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused imports Created 6 years, 4 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 | « pkg/analysis_server/tool/spec/codegen_java.dart ('k') | pkg/analysis_server/tool/spec/codegen_tools.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/tool/spec/codegen_matchers.dart
diff --git a/pkg/analysis_server/tool/spec/codegen_matchers.dart b/pkg/analysis_server/tool/spec/codegen_matchers.dart
index e2e62fb949282959a9896098bef886a5e9e00185..5abb7d5e6781456fc92eaa9a710610b474c1e735 100644
--- a/pkg/analysis_server/tool/spec/codegen_matchers.dart
+++ b/pkg/analysis_server/tool/spec/codegen_matchers.dart
@@ -8,7 +8,6 @@
library codegen.matchers;
import 'dart:convert';
-import 'dart:io';
import 'api.dart';
import 'codegen_tools.dart';
@@ -189,12 +188,15 @@ class CodegenMatchersVisitor extends HierarchicalApiVisitor with CodeGenerator {
}
}
+final GeneratedFile target = new GeneratedFile(
+ '../../test/integration/protocol_matchers.dart', () {
+ CodegenMatchersVisitor visitor = new CodegenMatchersVisitor(readApi());
+ return visitor.collectCode(visitor.visitApi);
+});
+
/**
* Translate spec_input.html into protocol_matchers.dart.
*/
main() {
- CodegenMatchersVisitor visitor = new CodegenMatchersVisitor(readApi());
- String code = visitor.collectCode(visitor.visitApi);
- File outputFile = new File('../../test/integration/protocol_matchers.dart');
- outputFile.writeAsStringSync(code);
+ target.generate();
}
« no previous file with comments | « pkg/analysis_server/tool/spec/codegen_java.dart ('k') | pkg/analysis_server/tool/spec/codegen_tools.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698