| 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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 void test_true_class_typeParameters_same() { | 1042 void test_true_class_typeParameters_same() { |
| 1043 _assertCompilationUnitMatches(true, r''' | 1043 _assertCompilationUnitMatches(true, r''' |
| 1044 class A<T> {} | 1044 class A<T> {} |
| 1045 ''', r''' | 1045 ''', r''' |
| 1046 class A<T> {} | 1046 class A<T> {} |
| 1047 '''); | 1047 '''); |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 void test_true_classMemberAccessor_getterSetter() { |
| 1051 _assertCompilationUnitMatches(true, r''' |
| 1052 class A { |
| 1053 int _test; |
| 1054 get test => _test; |
| 1055 set test(v) { |
| 1056 _test = v; |
| 1057 } |
| 1058 } |
| 1059 ''', r''' |
| 1060 class A { |
| 1061 int _test; |
| 1062 get test => _test; |
| 1063 set test(v) { |
| 1064 _test = v; |
| 1065 } |
| 1066 } |
| 1067 '''); |
| 1068 } |
| 1069 |
| 1050 void test_true_classMemberAccessor_list_reorder() { | 1070 void test_true_classMemberAccessor_list_reorder() { |
| 1051 _assertCompilationUnitMatches(true, r''' | 1071 _assertCompilationUnitMatches(true, r''' |
| 1052 class A { | 1072 class A { |
| 1053 get a => 1; | 1073 get a => 1; |
| 1054 get b => 2; | 1074 get b => 2; |
| 1055 get c => 3; | 1075 get c => 3; |
| 1056 } | 1076 } |
| 1057 ''', r''' | 1077 ''', r''' |
| 1058 class A { | 1078 class A { |
| 1059 get c => 3; | 1079 get c => 3; |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1593 } | 1613 } |
| 1594 | 1614 |
| 1595 void test_true_type_dynamic() { | 1615 void test_true_type_dynamic() { |
| 1596 _assertCompilationUnitMatches(true, r''' | 1616 _assertCompilationUnitMatches(true, r''' |
| 1597 dynamic a() {} | 1617 dynamic a() {} |
| 1598 ''', r''' | 1618 ''', r''' |
| 1599 dynamic a() {} | 1619 dynamic a() {} |
| 1600 '''); | 1620 '''); |
| 1601 } | 1621 } |
| 1602 | 1622 |
| 1623 void test_true_type_hasImportPrefix() { |
| 1624 _assertCompilationUnitMatches(true, r''' |
| 1625 import 'dart:async' as async; |
| 1626 async.Future F; |
| 1627 ''', r''' |
| 1628 import 'dart:async' as async; |
| 1629 async.Future F; |
| 1630 '''); |
| 1631 } |
| 1632 |
| 1603 void test_true_type_noTypeArguments_implyAllDynamic() { | 1633 void test_true_type_noTypeArguments_implyAllDynamic() { |
| 1604 _assertCompilationUnitMatches(true, r''' | 1634 _assertCompilationUnitMatches(true, r''' |
| 1605 class A<T> {} | 1635 class A<T> {} |
| 1606 A main() { | 1636 A main() { |
| 1607 } | 1637 } |
| 1608 ''', r''' | 1638 ''', r''' |
| 1609 class A<T> {} | 1639 class A<T> {} |
| 1610 A main() { | 1640 A main() { |
| 1611 } | 1641 } |
| 1612 '''); | 1642 '''); |
| (...skipping 1799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3412 _visitList(node.metadata, other.metadata); | 3442 _visitList(node.metadata, other.metadata); |
| 3413 _visitNode(node.identifier, other.identifier); | 3443 _visitNode(node.identifier, other.identifier); |
| 3414 } | 3444 } |
| 3415 | 3445 |
| 3416 static void assertSameResolution(CompilationUnit actual, | 3446 static void assertSameResolution(CompilationUnit actual, |
| 3417 CompilationUnit expected) { | 3447 CompilationUnit expected) { |
| 3418 _SameResolutionValidator validator = new _SameResolutionValidator(expected); | 3448 _SameResolutionValidator validator = new _SameResolutionValidator(expected); |
| 3419 actual.accept(validator); | 3449 actual.accept(validator); |
| 3420 } | 3450 } |
| 3421 } | 3451 } |
| OLD | NEW |