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

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

Issue 1620453002: Disable incremental resolution for constructor parameter names changes. (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/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 55e4a50c71798f93b7e32c9643946c365771d980..3f3390becadb092a696b70e52e1215c7566227e5 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -496,6 +496,20 @@ class A {
''');
}
+ void test_false_constructor_parameters_name() {
+ _assertDoesNotMatch(
+ r'''
+class A {
+ A(int a);
+}
+''',
+ r'''
+class A {
+ A(int b);
+}
+''');
+ }
+
void test_false_constructor_parameters_type_edit() {
_assertDoesNotMatch(
r'''
@@ -836,6 +850,22 @@ class A {
''');
}
+ void test_false_fieldFormalParameter_changeName_wasUnresolvedField() {
+ _assertDoesNotMatch(
+ r'''
+class A {
+ final fff;
+ A(this.unresolved);
+}
+''',
+ r'''
+class A {
+ final fff;
+ A(this.fff);
+}
+''');
+ }
+
void test_false_fieldFormalParameter_differentField() {
_assertDoesNotMatch(
r'''
@@ -2507,22 +2537,6 @@ 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'''
@@ -3171,15 +3185,6 @@ 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() {
@@ -4106,6 +4111,25 @@ class A {
expectedSuccess: false);
}
+ void test_false_wholeConstructor() {
+ _resolveUnit(r'''
+class A {
+ A(int a) {
+ print(a);
+ }
+}
+''');
+ _updateAndValidate(
+ r'''
+class A {
+ A(int b) {
+ print(b);
+ }
+}
+''',
+ expectedSuccess: false);
+ }
+
void test_fieldClassField_propagatedType() {
_resolveUnit(r'''
class A {
@@ -4328,23 +4352,6 @@ foo() {
_assertEqualErrors(newErrors, oldErrors);
}
- void test_true_wholeConstructor() {
- _resolveUnit(r'''
-class A {
- A(int a) {
- print(a);
- }
-}
-''');
- _updateAndValidate(r'''
-class A {
- A(int b) {
- print(b);
- }
-}
-''');
- }
-
void test_true_wholeConstructor_addInitializer() {
_resolveUnit(r'''
class A {
« 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