| 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 14768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14779 expect(functionType.parameters, isNotNull); | 14779 expect(functionType.parameters, isNotNull); |
| 14780 expect(functionType.returnType, isNotNull); | 14780 expect(functionType.returnType, isNotNull); |
| 14781 expect(functionType.typeParameters, isNull); | 14781 expect(functionType.typeParameters, isNull); |
| 14782 } | 14782 } |
| 14783 | 14783 |
| 14784 void test_parseTypeAlias_genericFunction_withDocComment() { | 14784 void test_parseTypeAlias_genericFunction_withDocComment() { |
| 14785 createParser('/// Doc\ntypedef F = bool Function();'); | 14785 createParser('/// Doc\ntypedef F = bool Function();'); |
| 14786 var typeAlias = parseFullCompilationUnitMember() as GenericTypeAlias; | 14786 var typeAlias = parseFullCompilationUnitMember() as GenericTypeAlias; |
| 14787 expectCommentText(typeAlias.documentationComment, '/// Doc'); | 14787 expectCommentText(typeAlias.documentationComment, '/// Doc'); |
| 14788 } | 14788 } |
| 14789 | |
| 14790 void test_parseTypeVariable_withDocumentationComment() { | |
| 14791 createParser(''' | |
| 14792 class A< | |
| 14793 /// Doc | |
| 14794 B> {} | |
| 14795 '''); | |
| 14796 var classDeclaration = parseFullCompilationUnitMember() as ClassDeclaration; | |
| 14797 var typeVariable = classDeclaration.typeParameters.typeParameters[0]; | |
| 14798 expectCommentText(typeVariable.documentationComment, '/// Doc'); | |
| 14799 } | |
| 14800 } | 14789 } |
| OLD | NEW |