| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.test.generated.parser_test; | 5 library analyzer.test.generated.parser_test; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; | 8 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; |
| 9 import 'package:analyzer/dart/ast/token.dart'; | 9 import 'package:analyzer/dart/ast/token.dart'; |
| 10 import 'package:analyzer/dart/ast/visitor.dart'; | 10 import 'package:analyzer/dart/ast/visitor.dart'; |
| (...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1663 } | 1663 } |
| 1664 | 1664 |
| 1665 @failingTest | 1665 @failingTest |
| 1666 void test_invalidCommentReference__nonNew_tooMuch() { | 1666 void test_invalidCommentReference__nonNew_tooMuch() { |
| 1667 createParser(''); | 1667 createParser(''); |
| 1668 CommentReference reference = parser.parseCommentReference('a.b.c.d', 0); | 1668 CommentReference reference = parser.parseCommentReference('a.b.c.d', 0); |
| 1669 expectNotNullIfNoErrors(reference); | 1669 expectNotNullIfNoErrors(reference); |
| 1670 listener.assertErrorsWithCodes([ParserErrorCode.INVALID_COMMENT_REFERENCE]); | 1670 listener.assertErrorsWithCodes([ParserErrorCode.INVALID_COMMENT_REFERENCE]); |
| 1671 } | 1671 } |
| 1672 | 1672 |
| 1673 void test_invalidConstructorName_with() { |
| 1674 createParser("C.with();"); |
| 1675 ClassMember member = parser.parseClassMember('C'); |
| 1676 expectNotNullIfNoErrors(member); |
| 1677 listener.assertErrorsWithCodes([ParserErrorCode.INVALID_CONSTRUCTOR_NAME]); |
| 1678 } |
| 1679 |
| 1673 void test_invalidHexEscape_invalidDigit() { | 1680 void test_invalidHexEscape_invalidDigit() { |
| 1674 createParser("'\\x0 a'"); | 1681 createParser("'\\x0 a'"); |
| 1675 StringLiteral literal = parser.parseStringLiteral(); | 1682 StringLiteral literal = parser.parseStringLiteral(); |
| 1676 expectNotNullIfNoErrors(literal); | 1683 expectNotNullIfNoErrors(literal); |
| 1677 listener.assertErrorsWithCodes([ParserErrorCode.INVALID_HEX_ESCAPE]); | 1684 listener.assertErrorsWithCodes([ParserErrorCode.INVALID_HEX_ESCAPE]); |
| 1678 } | 1685 } |
| 1679 | 1686 |
| 1680 void test_invalidHexEscape_tooFewDigits() { | 1687 void test_invalidHexEscape_tooFewDigits() { |
| 1681 createParser("'\\x0'"); | 1688 createParser("'\\x0'"); |
| 1682 StringLiteral literal = parser.parseStringLiteral(); | 1689 StringLiteral literal = parser.parseStringLiteral(); |
| (...skipping 12808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14491 expect(typeAlias.name, isNotNull); | 14498 expect(typeAlias.name, isNotNull); |
| 14492 expect(typeAlias.typeParameters, isNull); | 14499 expect(typeAlias.typeParameters, isNull); |
| 14493 expect(typeAlias.semicolon, isNotNull); | 14500 expect(typeAlias.semicolon, isNotNull); |
| 14494 GenericFunctionType functionType = typeAlias.functionType; | 14501 GenericFunctionType functionType = typeAlias.functionType; |
| 14495 expect(functionType, isNotNull); | 14502 expect(functionType, isNotNull); |
| 14496 expect(functionType.parameters, isNotNull); | 14503 expect(functionType.parameters, isNotNull); |
| 14497 expect(functionType.returnType, isNotNull); | 14504 expect(functionType.returnType, isNotNull); |
| 14498 expect(functionType.typeParameters, isNull); | 14505 expect(functionType.typeParameters, isNull); |
| 14499 } | 14506 } |
| 14500 } | 14507 } |
| OLD | NEW |