| 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 engine.incremental_resolver_test; | 5 library engine.incremental_resolver_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/error.dart'; | 10 import 'package:analyzer/src/generated/error.dart'; |
| (...skipping 2564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2575 } | 2575 } |
| 2576 '''); | 2576 '''); |
| 2577 _updateAndValidate(r''' | 2577 _updateAndValidate(r''' |
| 2578 main() { | 2578 main() { |
| 2579 // edited comment text | 2579 // edited comment text |
| 2580 print(0); | 2580 print(0); |
| 2581 } | 2581 } |
| 2582 '''); | 2582 '''); |
| 2583 } | 2583 } |
| 2584 | 2584 |
| 2585 void test_endOfLineComment_localFunction_inTopLevelVariable() { |
| 2586 _resolveUnit(r''' |
| 2587 typedef int Binary(one, two, three); |
| 2588 |
| 2589 int Global = f((a, b, c) { |
| 2590 return 0; // Some comment |
| 2591 }); |
| 2592 '''); |
| 2593 _updateAndValidate(r''' |
| 2594 typedef int Binary(one, two, three); |
| 2595 |
| 2596 int Global = f((a, b, c) { |
| 2597 return 0; // Some comment |
| 2598 }); |
| 2599 '''); |
| 2600 } |
| 2601 |
| 2585 void test_endOfLineComment_remove() { | 2602 void test_endOfLineComment_remove() { |
| 2586 _resolveUnit(r''' | 2603 _resolveUnit(r''' |
| 2587 main() { | 2604 main() { |
| 2588 // some comment | 2605 // some comment |
| 2589 print(0); | 2606 print(0); |
| 2590 } | 2607 } |
| 2591 '''); | 2608 '''); |
| 2592 _updateAndValidate(r''' | 2609 _updateAndValidate(r''' |
| 2593 main() { | 2610 main() { |
| 2594 print(0); | 2611 print(0); |
| (...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4173 _visitList(node.metadata, other.metadata); | 4190 _visitList(node.metadata, other.metadata); |
| 4174 _visitNode(node.identifier, other.identifier); | 4191 _visitNode(node.identifier, other.identifier); |
| 4175 } | 4192 } |
| 4176 | 4193 |
| 4177 static void assertSameResolution(CompilationUnit actual, | 4194 static void assertSameResolution(CompilationUnit actual, |
| 4178 CompilationUnit expected) { | 4195 CompilationUnit expected) { |
| 4179 _SameResolutionValidator validator = new _SameResolutionValidator(expected); | 4196 _SameResolutionValidator validator = new _SameResolutionValidator(expected); |
| 4180 actual.accept(validator); | 4197 actual.accept(validator); |
| 4181 } | 4198 } |
| 4182 } | 4199 } |
| OLD | NEW |