| 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 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1755 int m(int a, int b, int c) { | 1755 int m(int a, int b, int c) { |
| 1756 return a + b + c; | 1756 return a + b + c; |
| 1757 } | 1757 } |
| 1758 } | 1758 } |
| 1759 '''); | 1759 '''); |
| 1760 _resolve(_editString(r'''(int a, int b, int c) { | 1760 _resolve(_editString(r'''(int a, int b, int c) { |
| 1761 return a + b + c;''', r'''(int a, int second, int c) { | 1761 return a + b + c;''', r'''(int a, int second, int c) { |
| 1762 return a + second + c;'''), _isDeclaration); | 1762 return a + second + c;'''), _isDeclaration); |
| 1763 } | 1763 } |
| 1764 | 1764 |
| 1765 void test_superInvocation() { |
| 1766 _resolveUnit(r''' |
| 1767 class A { |
| 1768 foo(p) {} |
| 1769 } |
| 1770 class B extends A { |
| 1771 bar() { |
| 1772 super.foo(1 + 2); |
| 1773 } |
| 1774 }'''); |
| 1775 _resolve(_editString('+', '*'), _isFunctionBody); |
| 1776 } |
| 1777 |
| 1765 void test_topLevelFunction_label_add() { | 1778 void test_topLevelFunction_label_add() { |
| 1766 _resolveUnit(r''' | 1779 _resolveUnit(r''' |
| 1767 int main(int a, int b) { | 1780 int main(int a, int b) { |
| 1768 return a + b; | 1781 return a + b; |
| 1769 } | 1782 } |
| 1770 '''); | 1783 '''); |
| 1771 _resolve(_editString(' return', 'label: return a + b;'), _isBlock); | 1784 _resolve(_editString(' return', 'label: return a + b;'), _isBlock); |
| 1772 } | 1785 } |
| 1773 | 1786 |
| 1774 void test_topLevelFunction_label_remove() { | 1787 void test_topLevelFunction_label_remove() { |
| (...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3335 _visitList(node.metadata, other.metadata); | 3348 _visitList(node.metadata, other.metadata); |
| 3336 _visitNode(node.identifier, other.identifier); | 3349 _visitNode(node.identifier, other.identifier); |
| 3337 } | 3350 } |
| 3338 | 3351 |
| 3339 static void assertSameResolution(CompilationUnit actual, | 3352 static void assertSameResolution(CompilationUnit actual, |
| 3340 CompilationUnit expected) { | 3353 CompilationUnit expected) { |
| 3341 _SameResolutionValidator validator = new _SameResolutionValidator(expected); | 3354 _SameResolutionValidator validator = new _SameResolutionValidator(expected); |
| 3342 actual.accept(validator); | 3355 actual.accept(validator); |
| 3343 } | 3356 } |
| 3344 } | 3357 } |
| OLD | NEW |