| 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 11346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11357 } | 11357 } |
| 11358 | 11358 |
| 11359 void | 11359 void |
| 11360 test_parseNonLabeledStatement_variableDeclaration_gftType_noReturnType() { | 11360 test_parseNonLabeledStatement_variableDeclaration_gftType_noReturnType() { |
| 11361 createParser('Function(int) v;'); | 11361 createParser('Function(int) v;'); |
| 11362 Statement statement = parser.parseNonLabeledStatement(); | 11362 Statement statement = parser.parseNonLabeledStatement(); |
| 11363 expectNotNullIfNoErrors(statement); | 11363 expectNotNullIfNoErrors(statement); |
| 11364 listener.assertNoErrors(); | 11364 listener.assertNoErrors(); |
| 11365 } | 11365 } |
| 11366 | 11366 |
| 11367 void test_parseNonLabeledStatement_variableDeclaration_gftType_returnType() { |
| 11368 createParser('int Function<T>() v;'); |
| 11369 Statement statement = parser.parseNonLabeledStatement(); |
| 11370 expectNotNullIfNoErrors(statement); |
| 11371 listener.assertNoErrors(); |
| 11372 } |
| 11373 |
| 11367 void test_parseOptionalReturnType() { | 11374 void test_parseOptionalReturnType() { |
| 11368 // TODO(brianwilkerson) Implement tests for this method. | 11375 // TODO(brianwilkerson) Implement tests for this method. |
| 11369 } | 11376 } |
| 11370 | 11377 |
| 11371 void test_Parser() { | 11378 void test_Parser() { |
| 11372 expect(new Parser(null, null), isNotNull); | 11379 expect(new Parser(null, null), isNotNull); |
| 11373 } | 11380 } |
| 11374 | 11381 |
| 11375 void test_parseReturnStatement_noValue() { | 11382 void test_parseReturnStatement_noValue() { |
| 11376 createParser('return;'); | 11383 createParser('return;'); |
| (...skipping 3518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14895 expectCommentText(typeVariable.documentationComment, '/// Doc'); | 14902 expectCommentText(typeVariable.documentationComment, '/// Doc'); |
| 14896 } | 14903 } |
| 14897 | 14904 |
| 14898 /** | 14905 /** |
| 14899 * Assert that the given [name] is in declaration context. | 14906 * Assert that the given [name] is in declaration context. |
| 14900 */ | 14907 */ |
| 14901 void _assertIsDeclarationName(SimpleIdentifier name) { | 14908 void _assertIsDeclarationName(SimpleIdentifier name) { |
| 14902 expect(name.inDeclarationContext(), isTrue); | 14909 expect(name.inDeclarationContext(), isTrue); |
| 14903 } | 14910 } |
| 14904 } | 14911 } |
| OLD | NEW |