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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java

Issue 18532010: Fix for parsing top-level variable named 'get' or 'set'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
index 58755b9bd2cc6f936dae3360585c094339a7d2cf..15705c6022e5c951670f3bd725d05b53dcddc7f9 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
@@ -1778,6 +1778,24 @@ public class SimpleParserTest extends ParserTestCase {
assertNotNull(declaration.getVariables());
}
+ public void test_parseCompilationUnitMember_variableGet() throws Exception {
+ TopLevelVariableDeclaration declaration = parse(
+ "parseCompilationUnitMember",
+ new Object[] {emptyCommentAndMetadata()},
+ "String get = null;");
+ assertNotNull(declaration.getSemicolon());
+ assertNotNull(declaration.getVariables());
+ }
+
+ public void test_parseCompilationUnitMember_variableSet() throws Exception {
+ TopLevelVariableDeclaration declaration = parse(
+ "parseCompilationUnitMember",
+ new Object[] {emptyCommentAndMetadata()},
+ "String set = null;");
+ assertNotNull(declaration.getSemicolon());
+ assertNotNull(declaration.getVariables());
+ }
+
public void test_parseConditionalExpression() throws Exception {
ConditionalExpression expression = parse("parseConditionalExpression", "x ? y : z");
assertNotNull(expression.getCondition());

Powered by Google App Engine
This is Rietveld 408576698