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

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

Issue 15063006: Report ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 ae86bfcb37c1a3cd79ec2cd718204b66e9678071..4c3b11d99f098791ba371b3bd215535281521e40 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
@@ -253,6 +253,22 @@ public class ErrorParserTest extends ParserTestCase {
parse("parseClassMember", new Object[] {"C"}, "const int m() {}", ParserErrorCode.CONST_METHOD);
}
+ public void test_constructorWithReturnType() throws Exception {
+ parse(
+ "parseClassMember",
+ new Object[] {"C"},
+ "C C() {}",
+ ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE);
+ }
+
+ public void test_constructorWithReturnType_var() throws Exception {
+ parse(
+ "parseClassMember",
+ new Object[] {"C"},
+ "var C() {}",
+ ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE);
+ }
+
public void test_constTypedef() throws Exception {
parseCompilationUnit("const typedef F();", ParserErrorCode.CONST_TYPEDEF);
}
@@ -1094,14 +1110,6 @@ public class ErrorParserTest extends ParserTestCase {
parseCompilationUnit("var class C {}", ParserErrorCode.VAR_CLASS);
}
- public void test_varConstructor() throws Exception {
- parse(
- "parseClassMember",
- new Object[] {"C"},
- "var C() {}",
- ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE);
- }
-
public void test_varReturnType() throws Exception {
parse("parseClassMember", new Object[] {"C"}, "var m() {}", ParserErrorCode.VAR_RETURN_TYPE);
}

Powered by Google App Engine
This is Rietveld 408576698