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

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

Issue 1374313007: Fix for incremental resolver - changing field formal parameter name is sometimes a non-incremental … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/lib/src/generated/incremental_resolver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 293f4fd1e88bd67b975bfafa47b9d017165d4321..eaef1654096c5abf7885ace7545f039c8b4dc6f2 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -834,6 +834,24 @@ class A {
''');
}
+ void test_false_fieldFormalParameter_differentField() {
+ _assertDoesNotMatch(
+ r'''
+class A {
+ final aaa;
+ final bbb;
+ A(this.aaa, this.bbb);
+}
+''',
+ r'''
+class A {
+ final aaa;
+ final bbb;
+ A(this.bbb, this.aaa);
+}
+''');
+ }
+
void test_false_fieldFormalParameter_parameters_add() {
_assertDoesNotMatch(
r'''
@@ -930,6 +948,54 @@ class A {
''');
}
+ void test_false_fieldFormalParameter_typeAdd() {
+ _assertDoesNotMatch(
+ r'''
+class A {
+ final fff;
+ A(this.fff);
+}
+''',
+ r'''
+class A {
+ final fff;
+ A(int this.fff);
+}
+''');
+ }
+
+ void test_false_fieldFormalParameter_typeEdit() {
+ _assertDoesNotMatch(
+ r'''
+class A {
+ final fff;
+ A(int this.fff);
+}
+''',
+ r'''
+class A {
+ final fff;
+ A(String this.fff);
+}
+''');
+ }
+
+ void test_false_fieldFormalParameter_typeRemove() {
+ _assertDoesNotMatch(
+ r'''
+class A {
+ final fff;
+ A(int this.fff);
+}
+''',
+ r'''
+class A {
+ final fff;
+ A(this.fff);
+}
+''');
+ }
+
void test_false_fieldFormalParameterElement_wasSimple() {
_assertDoesNotMatch(
r'''
@@ -2383,6 +2449,22 @@ class A {
''');
}
+ void test_true_fieldFormalParameter_changeName_wasUnresolvedField() {
+ _assertMatches(
+ r'''
+class A {
+ final fff;
+ A(this.unresolved);
+}
+''',
+ r'''
+class A {
+ final fff;
+ A(this.fff);
+}
+''');
+ }
+
void test_true_fieldFormalParameter_function() {
_assertMatches(
r'''
@@ -2987,15 +3069,6 @@ class A {
_resolve(_editString('+', '*'), _isFunctionBody);
}
- void test_constructor_fieldFormalParameter() {
- _resolveUnit(r'''
-class A {
- int xy;
- A(this.x);
-}''');
- _resolve(_editString('this.x', 'this.xy'), _isDeclaration);
- }
-
void test_constructor_fieldInitializer_add() {
_resolveUnit(r'''
class A {
@@ -3050,6 +3123,15 @@ class B extends A {
_resolve(_editString('+', '*'), _isExpression);
}
+ void test_fieldFormalParameter() {
+ _resolveUnit(r'''
+class A {
+ int xy;
+ A(this.x);
+}''');
+ _resolve(_editString('this.x', 'this.xy'), _isDeclaration);
+ }
+
void test_function_localFunction_add() {
_resolveUnit(r'''
int main() {
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698