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

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

Issue 2270903002: Remove 'Element.docRange'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 3 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) 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/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/src/dart/scanner/reader.dart'; 10 import 'package:analyzer/src/dart/scanner/reader.dart';
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 UnlinkedDocumentationComment documentationComment, String text) { 279 UnlinkedDocumentationComment documentationComment, String text) {
280 expect(documentationComment, isNotNull); 280 expect(documentationComment, isNotNull);
281 int commentStart = text.indexOf('/*'); 281 int commentStart = text.indexOf('/*');
282 expect(commentStart, isNot(-1)); 282 expect(commentStart, isNot(-1));
283 int commentEnd = text.indexOf('*/'); 283 int commentEnd = text.indexOf('*/');
284 expect(commentEnd, isNot(-1)); 284 expect(commentEnd, isNot(-1));
285 commentEnd += 2; 285 commentEnd += 2;
286 String expectedCommentText = 286 String expectedCommentText =
287 text.substring(commentStart, commentEnd).replaceAll('\r\n', '\n'); 287 text.substring(commentStart, commentEnd).replaceAll('\r\n', '\n');
288 expect(documentationComment.text, expectedCommentText); 288 expect(documentationComment.text, expectedCommentText);
289 expect(documentationComment.offset, commentStart);
290 expect(documentationComment.length, commentEnd - commentStart);
291 } 289 }
292 290
293 /** 291 /**
294 * Verify that the given [typeRef] represents the type `dynamic`. 292 * Verify that the given [typeRef] represents the type `dynamic`.
295 */ 293 */
296 void checkDynamicTypeRef(EntityRef typeRef) { 294 void checkDynamicTypeRef(EntityRef typeRef) {
297 checkTypeRef(typeRef, null, null, 'dynamic'); 295 checkTypeRef(typeRef, null, null, 'dynamic');
298 } 296 }
299 297
300 /** 298 /**
(...skipping 10279 matching lines...) Expand 10 before | Expand all | Expand 10 after
10580 class _PrefixExpectation { 10578 class _PrefixExpectation {
10581 final ReferenceKind kind; 10579 final ReferenceKind kind;
10582 final String name; 10580 final String name;
10583 final String absoluteUri; 10581 final String absoluteUri;
10584 final String relativeUri; 10582 final String relativeUri;
10585 final int numTypeParameters; 10583 final int numTypeParameters;
10586 10584
10587 _PrefixExpectation(this.kind, this.name, 10585 _PrefixExpectation(this.kind, this.name,
10588 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); 10586 {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0});
10589 } 10587 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | pkg/analyzer/tool/summary/generate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698