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

Unified Diff: pkg/analysis_server/tool/spec/to_html.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/generate_files ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/tool/spec/to_html.dart
diff --git a/pkg/analysis_server/tool/spec/to_html.dart b/pkg/analysis_server/tool/spec/to_html.dart
index a1d53222c64e0b6a82cf120ad11b486e92eb71ee..6a3c251a1a5b4fc1d058d30ecd082c7c3eda2f8c 100644
--- a/pkg/analysis_server/tool/spec/to_html.dart
+++ b/pkg/analysis_server/tool/spec/to_html.dart
@@ -10,7 +10,6 @@
library to.html;
import 'dart:convert';
-import 'dart:io';
import 'package:html5lib/dom.dart' as dom;
@@ -529,15 +528,18 @@ class ToHtmlVisitor extends HierarchicalApiVisitor with HtmlMixin, HtmlGenerator
}
}
-/**
- * Translate spec_input.html into api.html.
- */
-main() {
+final GeneratedFile target = new GeneratedFile('../../doc/api.html', () {
ToHtmlVisitor visitor = new ToHtmlVisitor(readApi());
dom.Document document = new dom.Document();
for (dom.Node node in visitor.collectHtml(visitor.visitApi)) {
document.append(node);
}
- File outputFile = new File('../../doc/api.html');
- outputFile.writeAsStringSync(document.outerHtml);
+ return document.outerHtml;
+});
+
+/**
+ * Translate spec_input.html into api.html.
+ */
+main() {
+ target.generate();
}
« no previous file with comments | « pkg/analysis_server/tool/spec/generate_files ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698