Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 2738013002: Add support for metadata on type variables to Fasta parser. (Closed)
Patch Set: Bug fixes Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 14712 matching lines...) Expand 10 before | Expand all | Expand 10 after
14723 expect(functionType.parameters, isNotNull); 14723 expect(functionType.parameters, isNotNull);
14724 expect(functionType.returnType, isNotNull); 14724 expect(functionType.returnType, isNotNull);
14725 expect(functionType.typeParameters, isNull); 14725 expect(functionType.typeParameters, isNull);
14726 } 14726 }
14727 14727
14728 void test_parseTypeAlias_genericFunction_withDocComment() { 14728 void test_parseTypeAlias_genericFunction_withDocComment() {
14729 createParser('/// Doc\ntypedef F = bool Function();'); 14729 createParser('/// Doc\ntypedef F = bool Function();');
14730 var typeAlias = parseFullCompilationUnitMember() as GenericTypeAlias; 14730 var typeAlias = parseFullCompilationUnitMember() as GenericTypeAlias;
14731 expectCommentText(typeAlias.documentationComment, '/// Doc'); 14731 expectCommentText(typeAlias.documentationComment, '/// Doc');
14732 } 14732 }
14733
14734 void test_parseTypeVariable_withDocumentationComment() {
14735 createParser('''
14736 class A<
14737 /// Doc
14738 B> {}
14739 ''');
14740 var classDeclaration = parseFullCompilationUnitMember() as ClassDeclaration;
14741 var typeVariable = classDeclaration.typeParameters.typeParameters[0];
14742 expectCommentText(typeVariable.documentationComment, '/// Doc');
14743 }
14733 } 14744 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698