| 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 5d304c70e61c4ea5fda64245c93b2b921b85c821..097980a8630f7049abc74c439d558b84f482e51a 100644
|
| --- a/pkg/analyzer/test/generated/parser_test.dart
|
| +++ b/pkg/analyzer/test/generated/parser_test.dart
|
| @@ -7334,6 +7334,16 @@ void''');
|
| expect(literal.rightBracket, isNotNull);
|
| }
|
|
|
| + void test_parseConstExpression_listLiteral_typed_genericComment() {
|
| + enableGenericMethodComments = true;
|
| + ListLiteral literal = parse4("parseConstExpression", "const /*<A>*/ []");
|
| + expect(literal.constKeyword, isNotNull);
|
| + expect(literal.typeArguments, isNotNull);
|
| + expect(literal.leftBracket, isNotNull);
|
| + expect(literal.elements, hasLength(0));
|
| + expect(literal.rightBracket, isNotNull);
|
| + }
|
| +
|
| void test_parseConstExpression_listLiteral_untyped() {
|
| ListLiteral literal = parse4("parseConstExpression", "const []");
|
| expect(literal.constKeyword, isNotNull);
|
| @@ -7351,6 +7361,15 @@ void''');
|
| expect(literal.typeArguments, isNotNull);
|
| }
|
|
|
| + void test_parseConstExpression_mapLiteral_typed_genericComment() {
|
| + enableGenericMethodComments = true;
|
| + MapLiteral literal = parse4("parseConstExpression", "const /*<A, B>*/ {}");
|
| + expect(literal.leftBracket, isNotNull);
|
| + expect(literal.entries, hasLength(0));
|
| + expect(literal.rightBracket, isNotNull);
|
| + expect(literal.typeArguments, isNotNull);
|
| + }
|
| +
|
| void test_parseConstExpression_mapLiteral_untyped() {
|
| MapLiteral literal = parse4("parseConstExpression", "const {}");
|
| expect(literal.leftBracket, isNotNull);
|
| @@ -9856,6 +9875,13 @@ void''');
|
| expect(literal.typeArguments.arguments, hasLength(1));
|
| }
|
|
|
| + void test_parsePrimaryExpression_listLiteral_typed_genericComment() {
|
| + enableGenericMethodComments = true;
|
| + ListLiteral literal = parse4("parsePrimaryExpression", "/*<A>*/[ ]");
|
| + expect(literal.typeArguments, isNotNull);
|
| + expect(literal.typeArguments.arguments, hasLength(1));
|
| + }
|
| +
|
| void test_parsePrimaryExpression_mapLiteral() {
|
| MapLiteral literal = parse4("parsePrimaryExpression", "{}");
|
| expect(literal, isNotNull);
|
| @@ -9867,6 +9893,13 @@ void''');
|
| expect(literal.typeArguments.arguments, hasLength(2));
|
| }
|
|
|
| + void test_parsePrimaryExpression_mapLiteral_typed_genericComment() {
|
| + enableGenericMethodComments = true;
|
| + MapLiteral literal = parse4("parsePrimaryExpression", "/*<A, B>*/{}");
|
| + expect(literal.typeArguments, isNotNull);
|
| + expect(literal.typeArguments.arguments, hasLength(2));
|
| + }
|
| +
|
| void test_parsePrimaryExpression_new() {
|
| InstanceCreationExpression expression =
|
| parse4("parsePrimaryExpression", "new A()");
|
|
|