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

Unified Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 2812243006: Reland: Fix more parser bugs (Closed)
Patch Set: Created 3 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/src/generated/parser.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/generated/parser_test.dart
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index fd703ebbfab8b25a985481be22278db8a11ed1c1..424bd86d535a2601fc3e285261ea7ffcb6850cd9 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -4134,18 +4134,12 @@ void main() {
void test_voidVariable_statement_initializer() {
parseStatement("void x = 0;");
- assertErrorsWithCodes([
- ParserErrorCode.VOID_VARIABLE,
- ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE
- ]);
+ assertErrorsWithCodes([ParserErrorCode.VOID_VARIABLE]);
}
void test_voidVariable_statement_noInitializer() {
parseStatement("void x;");
- assertErrorsWithCodes([
- ParserErrorCode.VOID_VARIABLE,
- ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE
- ]);
+ assertErrorsWithCodes([ParserErrorCode.VOID_VARIABLE]);
}
void test_withBeforeExtends() {
@@ -11349,6 +11343,15 @@ Function(int, String) v;
}
void
+ test_parseNonLabeledStatement_variableDeclaration_gftType_functionReturnType() {
+ createParser(
+ 'Function Function(int x1, {Function x}) Function<B extends core.int>(int x) l771;');
+ Statement statement = parser.parseNonLabeledStatement();
+ expectNotNullIfNoErrors(statement);
+ listener.assertNoErrors();
+ }
+
+ void
test_parseNonLabeledStatement_variableDeclaration_gftType_gftReturnType() {
createParser('Function(int) Function(int) v;');
Statement statement = parser.parseNonLabeledStatement();
@@ -11357,6 +11360,14 @@ Function(int, String) v;
}
void
+ test_parseNonLabeledStatement_variableDeclaration_gftType_gftReturnType2() {
+ createParser('int Function(int) Function(int) v;');
+ Statement statement = parser.parseNonLabeledStatement();
+ expectNotNullIfNoErrors(statement);
+ listener.assertNoErrors();
+ }
+
+ void
test_parseNonLabeledStatement_variableDeclaration_gftType_noReturnType() {
createParser('Function(int) v;');
Statement statement = parser.parseNonLabeledStatement();
@@ -11371,6 +11382,14 @@ Function(int, String) v;
listener.assertNoErrors();
}
+ void
+ test_parseNonLabeledStatement_variableDeclaration_gftType_voidReturnType() {
+ createParser('void Function() v;');
+ Statement statement = parser.parseNonLabeledStatement();
+ expectNotNullIfNoErrors(statement);
+ listener.assertNoErrors();
+ }
+
void test_parseOptionalReturnType() {
// TODO(brianwilkerson) Implement tests for this method.
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698