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

Side by Side Diff: pkg/analyzer/test/src/summary/summary_common.dart

Issue 2615013003: Fix for summarizing triple slash documentation comments. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_common.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.src.summary.summary_common; 5 library analyzer.test.src.summary.summary_common;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/dart/ast/ast.dart'; 8 import 'package:analyzer/dart/ast/ast.dart';
9 import 'package:analyzer/error/listener.dart'; 9 import 'package:analyzer/error/listener.dart';
10 import 'package:analyzer/src/dart/scanner/reader.dart'; 10 import 'package:analyzer/src/dart/scanner/reader.dart';
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 // Extra comment so doc comment offset != 0 1296 // Extra comment so doc comment offset != 0
1297 /** 1297 /**
1298 * Docs 1298 * Docs
1299 */ 1299 */
1300 class C {}'''; 1300 class C {}''';
1301 UnlinkedClass cls = serializeClassText(text); 1301 UnlinkedClass cls = serializeClassText(text);
1302 expect(cls.documentationComment, isNotNull); 1302 expect(cls.documentationComment, isNotNull);
1303 checkDocumentationComment(cls.documentationComment, text); 1303 checkDocumentationComment(cls.documentationComment, text);
1304 } 1304 }
1305 1305
1306 test_class_documented_tripleSlash() {
1307 if (!includeInformative) return;
1308 String text = '''
1309 /// aaa
1310 /// bbbb
1311 /// cc
1312 class C {}''';
1313 UnlinkedClass cls = serializeClassText(text);
1314 UnlinkedDocumentationComment comment = cls.documentationComment;
1315 expect(comment, isNotNull);
1316 expect(comment.text, '/// aaa\n/// bbbb\n/// cc');
1317 }
1318
1306 test_class_documented_with_references() { 1319 test_class_documented_with_references() {
1307 if (!includeInformative) return; 1320 if (!includeInformative) return;
1308 String text = ''' 1321 String text = '''
1309 // Extra comment so doc comment offset != 0 1322 // Extra comment so doc comment offset != 0
1310 /** 1323 /**
1311 * Docs referring to [D] and [E] 1324 * Docs referring to [D] and [E]
1312 */ 1325 */
1313 class C {} 1326 class C {}
1314 1327
1315 class D {} 1328 class D {}
(...skipping 9169 matching lines...) Expand 10 before | Expand all | Expand 10 after
10485 class _PrefixExpectation { 10498 class _PrefixExpectation {
10486 final ReferenceKind kind; 10499 final ReferenceKind kind;
10487 final String name; 10500 final String name;
10488 final String absoluteUri; 10501 final String absoluteUri;
10489 final String relativeUri; 10502 final String relativeUri;
10490 final int numTypeParameters; 10503 final int numTypeParameters;
10491 10504
10492 _PrefixExpectation(this.kind, this.name, 10505 _PrefixExpectation(this.kind, this.name,
10493 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); 10506 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0});
10494 } 10507 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_common.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698