| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.test.generated.incremental_resolver_test; | 5 library analyzer.test.generated.incremental_resolver_test; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/element/element.dart'; | 7 import 'package:analyzer/dart/element/element.dart'; |
| 8 import 'package:analyzer/src/context/cache.dart'; | 8 import 'package:analyzer/src/context/cache.dart'; |
| 9 import 'package:analyzer/src/dart/element/element.dart'; | 9 import 'package:analyzer/src/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/generated/ast.dart'; | 10 import 'package:analyzer/src/generated/ast.dart'; |
| (...skipping 3972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3983 '''); | 3983 '''); |
| 3984 _updateAndValidate(r''' | 3984 _updateAndValidate(r''' |
| 3985 class A { | 3985 class A { |
| 3986 m() { | 3986 m() { |
| 3987 print(2 + 3); | 3987 print(2 + 3); |
| 3988 } | 3988 } |
| 3989 } | 3989 } |
| 3990 '''); | 3990 '''); |
| 3991 } | 3991 } |
| 3992 | 3992 |
| 3993 void test_inBody_functionExpression() { |
| 3994 _resolveUnit(r''' |
| 3995 class C extends D { |
| 3996 static final f = () { |
| 3997 var x = 0; |
| 3998 }(); |
| 3999 } |
| 4000 |
| 4001 class D {} |
| 4002 '''); |
| 4003 _updateAndValidate(r''' |
| 4004 class C extends D { |
| 4005 static final f = () { |
| 4006 var x = 01; |
| 4007 }(); |
| 4008 } |
| 4009 |
| 4010 class D {} |
| 4011 '''); |
| 4012 } |
| 4013 |
| 3993 void test_inBody_insertStatement() { | 4014 void test_inBody_insertStatement() { |
| 3994 _resolveUnit(r''' | 4015 _resolveUnit(r''' |
| 3995 main() { | 4016 main() { |
| 3996 print(1); | 4017 print(1); |
| 3997 } | 4018 } |
| 3998 '''); | 4019 '''); |
| 3999 _updateAndValidate(r''' | 4020 _updateAndValidate(r''' |
| 4000 main() { | 4021 main() { |
| 4001 print(0); | 4022 print(0); |
| 4002 print(1); | 4023 print(1); |
| (...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4939 return ResolutionContextBuilder.contextFor(node, listener).scope; | 4960 return ResolutionContextBuilder.contextFor(node, listener).scope; |
| 4940 } | 4961 } |
| 4941 } | 4962 } |
| 4942 | 4963 |
| 4943 class _Edit { | 4964 class _Edit { |
| 4944 final int offset; | 4965 final int offset; |
| 4945 final int length; | 4966 final int length; |
| 4946 final String replacement; | 4967 final String replacement; |
| 4947 _Edit(this.offset, this.length, this.replacement); | 4968 _Edit(this.offset, this.length, this.replacement); |
| 4948 } | 4969 } |
| OLD | NEW |