| 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);
|
| }
|
| }
|
|
|