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

Unified Diff: pkg/analyzer/test/parse_compilation_unit_test.dart

Issue 1081083002: expose option to not parse function bodies when calling parseCompilationUnit (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/analyzer/lib/analyzer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/parse_compilation_unit_test.dart
diff --git a/pkg/analyzer/test/parse_compilation_unit_test.dart b/pkg/analyzer/test/parse_compilation_unit_test.dart
index 756c2274d3f6018191d199b1e1dd34f4df729f46..c84b9553b360451de933c6c862e48129e0c29f6a 100644
--- a/pkg/analyzer/test/parse_compilation_unit_test.dart
+++ b/pkg/analyzer/test/parse_compilation_unit_test.dart
@@ -32,4 +32,10 @@ void main() {
error.toString().contains("Error in <unknown source>: Expected to find ';'");
})));
});
+
+ test("allows you to specify whether or not to parse function bodies", () {
+ var unit = parseCompilationUnit(
+ "void main() => print('Hello, world!');", parseFunctionBodies: false);
+ expect(unit.toString(), equals("void main() ;"));
+ });
}
« no previous file with comments | « pkg/analyzer/lib/analyzer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698