| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 /** | 59 /** |
| 60 * Get the parser used by the test. | 60 * Get the parser used by the test. |
| 61 * | 61 * |
| 62 * Caller must first invoke [createParser]. | 62 * Caller must first invoke [createParser]. |
| 63 */ | 63 */ |
| 64 Parser get parser; | 64 Parser get parser; |
| 65 | 65 |
| 66 /** | 66 /** |
| 67 * Assert that the number and codes of errors occurred during parsing is the | 67 * Assert that the number and codes of errors occurred during parsing is the |
| 68 * same the the [expectedErrorCodes]. | 68 * same as the [expectedErrorCodes]. |
| 69 */ | 69 */ |
| 70 void assertErrorsWithCodes(List<ErrorCode> expectedErrorCodes); | 70 void assertErrorsWithCodes(List<ErrorCode> expectedErrorCodes); |
| 71 | 71 |
| 72 /** | 72 /** |
| 73 * Asserts that no errors occurred during parsing. | 73 * Asserts that no errors occurred during parsing. |
| 74 */ | 74 */ |
| 75 void assertNoErrors(); | 75 void assertNoErrors(); |
| 76 | 76 |
| 77 /** | 77 /** |
| 78 * Prepares to parse using tokens scanned from the given [content] string. | 78 * Prepares to parse using tokens scanned from the given [content] string. |
| (...skipping 14867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14946 expectCommentText(typeVariable.documentationComment, '/// Doc'); | 14946 expectCommentText(typeVariable.documentationComment, '/// Doc'); |
| 14947 } | 14947 } |
| 14948 | 14948 |
| 14949 /** | 14949 /** |
| 14950 * Assert that the given [name] is in declaration context. | 14950 * Assert that the given [name] is in declaration context. |
| 14951 */ | 14951 */ |
| 14952 void _assertIsDeclarationName(SimpleIdentifier name) { | 14952 void _assertIsDeclarationName(SimpleIdentifier name) { |
| 14953 expect(name.inDeclarationContext(), isTrue); | 14953 expect(name.inDeclarationContext(), isTrue); |
| 14954 } | 14954 } |
| 14955 } | 14955 } |
| OLD | NEW |