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

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

Issue 17570003: Report ParserErrorCode.STATIC_FUNCTION_DECLARATION (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Check all modifiers Created 7 years, 6 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/ErrorParserTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
index 68fa6dba9f1eafb0b35d8631d537e0d013bd3547..ce589f391eb710717dbec5a02146fa94e09f3e4a 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
@@ -743,6 +743,22 @@ public class ErrorParserTest extends ParserTestCase {
assertNotNull(unit);
}
+ public void test_localFunctionDeclarationModifier_abstract() throws Exception {
+ parseStatement("abstract f() {}", ParserErrorCode.LOCAL_FUNCTION_DECLARATION_MODIFIER);
+ }
+
+ public void test_localFunctionDeclarationModifier_external() throws Exception {
+ parseStatement("external f() {}", ParserErrorCode.LOCAL_FUNCTION_DECLARATION_MODIFIER);
+ }
+
+ public void test_localFunctionDeclarationModifier_factory() throws Exception {
+ parseStatement("factory f() {}", ParserErrorCode.LOCAL_FUNCTION_DECLARATION_MODIFIER);
+ }
+
+ public void test_localFunctionDeclarationModifier_static() throws Exception {
+ parseStatement("static f() {}", ParserErrorCode.LOCAL_FUNCTION_DECLARATION_MODIFIER);
+ }
+
public void test_missingAssignableSelector_identifiersAssigned() throws Exception {
parseExpression("x.y = y;");
}
@@ -1083,6 +1099,10 @@ public class ErrorParserTest extends ParserTestCase {
parseCompilationUnit("static class C {}", ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION);
}
+ public void test_staticTopLevelDeclaration_function() throws Exception {
+ parseCompilationUnit("static f() {}", ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION);
+ }
+
public void test_staticTopLevelDeclaration_typedef() throws Exception {
parseCompilationUnit("static typedef F();", ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION);
}

Powered by Google App Engine
This is Rietveld 408576698