| 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 e8349ffeb3c196cb09b4cd5c4267f0613a632f04..8b664f98014ae062ce88ebf9814d3267451cefc6 100644
|
| --- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
|
| +++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
|
| @@ -910,6 +910,30 @@ main(int callback(int a, String b)) {
|
| ''');
|
| }
|
|
|
| + void test_false_getter_body_add() {
|
| + _assertDoesNotMatchOK(r'''
|
| +class A {
|
| + int get foo;
|
| +}
|
| +''', r'''
|
| +class A {
|
| + int get foo => 0;
|
| +}
|
| +''');
|
| + }
|
| +
|
| + void test_false_getter_body_remove() {
|
| + _assertDoesNotMatchOK(r'''
|
| +class A {
|
| + int get foo => 0;
|
| +}
|
| +''', r'''
|
| +class A {
|
| + int get foo;
|
| +}
|
| +''');
|
| + }
|
| +
|
| void test_false_implementsClause_add() {
|
| _assertDoesNotMatch(r'''
|
| class A {}
|
| @@ -1088,6 +1112,30 @@ class A {
|
| ''');
|
| }
|
|
|
| + void test_false_method_body_add() {
|
| + _assertDoesNotMatchOK(r'''
|
| +class A {
|
| + void foo();
|
| +}
|
| +''', r'''
|
| +class A {
|
| + void foo() {}
|
| +}
|
| +''');
|
| + }
|
| +
|
| + void test_false_method_body_remove() {
|
| + _assertDoesNotMatchOK(r'''
|
| +class A {
|
| + void foo() {}
|
| +}
|
| +''', r'''
|
| +class A {
|
| + void foo();
|
| +}
|
| +''');
|
| + }
|
| +
|
| void test_false_method_generator_add() {
|
| _assertDoesNotMatchOK(r'''
|
| class A {
|
| @@ -1622,6 +1670,30 @@ class B<T> = A<T> with M<T>;
|
| ''');
|
| }
|
|
|
| + void test_true_constructor_body_add() {
|
| + _assertMatches(r'''
|
| +class A {
|
| + A(int p);
|
| +}
|
| +''', r'''
|
| +class A {
|
| + A(int p) {}
|
| +}
|
| +''');
|
| + }
|
| +
|
| + void test_true_constructor_body_remove() {
|
| + _assertMatches(r'''
|
| +class A {
|
| + A(int p) {}
|
| +}
|
| +''', r'''
|
| +class A {
|
| + A(int p);
|
| +}
|
| +''');
|
| + }
|
| +
|
| void test_true_constructor_named_same() {
|
| _assertMatches(r'''
|
| class A {
|
| @@ -3838,9 +3910,8 @@ class ResolutionContextBuilderTest extends EngineTestCase {
|
| unit.declarations.add(classNode);
|
| ClassElement classElement = ElementFactory.classElement2(className);
|
| classNode.name.staticElement = classElement;
|
| - (unit.element as CompilationUnitElementImpl).types = <ClassElement>[
|
| - classElement
|
| - ];
|
| + (unit.element as CompilationUnitElementImpl).types =
|
| + <ClassElement>[classElement];
|
| return classNode;
|
| }
|
|
|
| @@ -3852,9 +3923,8 @@ class ResolutionContextBuilderTest extends EngineTestCase {
|
| unit.declarations.add(classNode);
|
| ClassElement classElement = ElementFactory.classElement2(className);
|
| classNode.name.staticElement = classElement;
|
| - (unit.element as CompilationUnitElementImpl).types = <ClassElement>[
|
| - classElement
|
| - ];
|
| + (unit.element as CompilationUnitElementImpl).types =
|
| + <ClassElement>[classElement];
|
| return classNode;
|
| }
|
|
|
| @@ -3876,9 +3946,8 @@ class ResolutionContextBuilderTest extends EngineTestCase {
|
| ConstructorElement constructorElement =
|
| ElementFactory.constructorElement2(classNode.element, null);
|
| constructorNode.element = constructorElement;
|
| - (classNode.element as ClassElementImpl).constructors = <ConstructorElement>[
|
| - constructorElement
|
| - ];
|
| + (classNode.element as ClassElementImpl).constructors =
|
| + <ConstructorElement>[constructorElement];
|
| return constructorNode;
|
| }
|
|
|
| @@ -3891,9 +3960,8 @@ class ResolutionContextBuilderTest extends EngineTestCase {
|
| FunctionElement functionElement =
|
| ElementFactory.functionElement(functionName);
|
| functionNode.name.staticElement = functionElement;
|
| - (unit.element as CompilationUnitElementImpl).functions = <FunctionElement>[
|
| - functionElement
|
| - ];
|
| + (unit.element as CompilationUnitElementImpl).functions =
|
| + <FunctionElement>[functionElement];
|
| return functionNode;
|
| }
|
|
|
| @@ -3922,9 +3990,8 @@ class ResolutionContextBuilderTest extends EngineTestCase {
|
| MethodElement methodElement =
|
| ElementFactory.methodElement(methodName, null);
|
| methodNode.name.staticElement = methodElement;
|
| - (classNode.element as ClassElementImpl).methods = <MethodElement>[
|
| - methodElement
|
| - ];
|
| + (classNode.element as ClassElementImpl).methods =
|
| + <MethodElement>[methodElement];
|
| return methodNode;
|
| }
|
|
|
|
|