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

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

Issue 26466005: Support for parsing 'class name = mixinApplication', report error for 'typedef name = mixinApplicat… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changes for review comments. Created 7 years, 2 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 7e4da21f63370ec366143ff2d59bb2a70c139b24..9abb8a57042bdfcbe6036caf9fcd043f9299a2e4 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
@@ -34,6 +34,20 @@ import static com.google.dart.engine.scanner.TokenFactory.token;
* that errors are correctly reported, and in some cases, not reported.
*/
public class ErrorParserTest extends ParserTestCase {
+ public void fail_deprecatedClassTypeAlias() throws Exception {
+ // TODO(scheglov) report error when VM and dart2js start to accept new syntax
+ parseCompilationUnit(
+ "typedef C = abstract S with M;",
+ ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS);
+ }
+
+ public void fail_deprecatedClassTypeAlias_withGeneric() throws Exception {
+ // TODO(scheglov) report error when VM and dart2js start to accept new syntax
+ parseCompilationUnit(
+ "typedef C<T> = abstract S<T> with M;",
+ ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS);
+ }
+
public void fail_expectedListOrMapLiteral() throws Exception {
// It isn't clear that this test can ever pass. The parser is currently create a synthetic list
// literal in this case, but isSynthetic() isn't overridden for ListLiteral. The problem is that
@@ -495,8 +509,8 @@ public class ErrorParserTest extends ParserTestCase {
parseStatement("void}", ParserErrorCode.EXPECTED_TOKEN, ParserErrorCode.MISSING_IDENTIFIER);
}
- public void test_expectedToken_semicolonAfterTypedef() throws Exception {
- Token token = token(Keyword.TYPEDEF);
+ public void test_expectedToken_semicolonAfterClass() throws Exception {
+ Token token = token(Keyword.CLASS);
parse(
"parseClassTypeAlias",
new Object[] {emptyCommentAndMetadata(), token},

Powered by Google App Engine
This is Rietveld 408576698