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

Unified Diff: pkg/analyzer/test/src/summary/summary_test.dart

Issue 1564343004: Add support for Element.docRange to the summary. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | pkg/analyzer/tool/summary/idl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/summary_test.dart
diff --git a/pkg/analyzer/test/src/summary/summary_test.dart b/pkg/analyzer/test/src/summary/summary_test.dart
index 7d9bb94bbd19a533697a4ace5ffa61f3a40190da..9a49cbdee932880fbd8d0c71be81138cd752fe5b 100644
--- a/pkg/analyzer/test/src/summary/summary_test.dart
+++ b/pkg/analyzer/test/src/summary/summary_test.dart
@@ -241,8 +241,11 @@ abstract class SummaryTest {
int commentEnd = text.indexOf('*/');
expect(commentEnd, isNot(-1));
commentEnd += 2;
- String expectedCommentText = text.substring(commentStart, commentEnd);
+ String expectedCommentText =
+ text.substring(commentStart, commentEnd).replaceAll('\r\n', '\n');
expect(documentationComment.text, expectedCommentText);
+ expect(documentationComment.offset, commentStart);
+ expect(documentationComment.length, commentEnd - commentStart);
}
/**
@@ -874,10 +877,9 @@ class E {}''';
test_class_documented_with_with_windows_line_endings() {
String text = '/**\r\n * Docs\r\n */\r\nclass C {}';
- String convertedText = text.replaceAll('\r\n', '\n');
UnlinkedClass cls = serializeClassText(text);
expect(cls.documentationComment, isNotNull);
- checkDocumentationComment(cls.documentationComment, convertedText);
+ checkDocumentationComment(cls.documentationComment, text);
}
test_class_interface() {
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | pkg/analyzer/tool/summary/idl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698