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

Unified Diff: pkg/analyzer/test/generated/incremental_resolver_test.dart

Issue 764243003: Updated detached tokens of references in documentation comments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
Index: pkg/analyzer/test/generated/incremental_resolver_test.dart
diff --git a/pkg/analyzer/test/generated/incremental_resolver_test.dart b/pkg/analyzer/test/generated/incremental_resolver_test.dart
index 7c3a3638dc93754c5be588f4943ef81aade08527..46f7c8afe9b3bd00dd6a2cf4235fe4bfdce239e9 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -2230,7 +2230,23 @@ main() {
''');
}
- void test_dartDoc_clumsy_updateText() {
+ void test_dartDoc_clumsy_updateText_beforeKeywordToken() {
+ _resolveUnit(r'''
+/**
+ * A comment with the [int] type reference.
+ */
+class A {}
+''');
+ _updateAndValidate(r'''
+/**
+ * A comment with the [int] type reference.
+ * Plus reference to [A] itself.
+ */
+class A {}
+''');
+ }
+
+ void test_dartDoc_clumsy_updateText_insert() {
_resolveUnit(r'''
/**
* A function [main] with a parameter [p] of type [int].
@@ -2238,37 +2254,47 @@ main() {
main(int p) {
}
/**
- * Other comment.
+ * Other comment with [int] reference.
*/
foo() {}
''');
_updateAndValidate(r'''
/**
* A function [main] with a parameter [p] of type [int].
- * Updated.
+ * Inserted text with [String] reference.
*/
main(int p) {
}
/**
- * Other comment.
+ * Other comment with [int] reference.
*/
foo() {}
''');
}
- void test_dartDoc_clumsy_updateText_beforeKeywordToken() {
+ void test_dartDoc_clumsy_updateText_remove() {
_resolveUnit(r'''
/**
- * A comment with the [int] type reference.
+ * A function [main] with a parameter [p] of type [int].
+ * Some text with [String] reference to remove.
*/
-class A {}
+main(int p) {
+}
+/**
+ * Other comment with [int] reference.
+ */
+foo() {}
''');
_updateAndValidate(r'''
/**
- * A comment with the [int] type reference.
- * Plus reference to [A] itself.
+ * A function [main] with a parameter [p] of type [int].
*/
-class A {}
+main(int p) {
+}
+/**
+ * Other comment with [int] reference.
+ */
+foo() {}
''');
}
@@ -3846,6 +3872,8 @@ class _SameResolutionValidator implements AstVisitor {
expect(other, isNull);
} else {
this.other = other;
+ expect(node.offset, other.offset);
+ expect(node.length, other.length);
node.accept(this);
}
}

Powered by Google App Engine
This is Rietveld 408576698