OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.declaration_resolver_test; | 5 library engine.declaration_resolver_test; |
6 | 6 |
7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
8 import 'package:analyzer/dart/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
9 import 'package:analyzer/src/dart/ast/ast.dart'; | 9 import 'package:analyzer/src/dart/ast/ast.dart'; |
10 import 'package:analyzer/src/dart/ast/utilities.dart'; | 10 import 'package:analyzer/src/dart/ast/utilities.dart'; |
11 import 'package:analyzer/src/generated/engine.dart'; | 11 import 'package:analyzer/src/generated/engine.dart'; |
12 import 'package:analyzer/src/generated/resolver.dart'; | 12 import 'package:analyzer/src/generated/resolver.dart'; |
13 import 'package:analyzer/src/generated/source.dart'; | 13 import 'package:analyzer/src/generated/source.dart'; |
14 import 'package:analyzer/src/task/dart.dart'; | 14 import 'package:analyzer/src/task/dart.dart'; |
15 import 'package:analyzer/task/dart.dart'; | 15 import 'package:analyzer/task/dart.dart'; |
16 import 'package:unittest/unittest.dart'; | 16 import 'package:unittest/unittest.dart'; |
17 | 17 |
18 import '../reflective_tests.dart'; | 18 import '../reflective_tests.dart'; |
19 import '../utils.dart'; | 19 import '../utils.dart'; |
20 import 'resolver_test.dart'; | 20 import 'resolver_test_case.dart'; |
21 import 'test_support.dart'; | 21 import 'test_support.dart'; |
22 | 22 |
23 main() { | 23 main() { |
24 initializeTestEnvironment(); | 24 initializeTestEnvironment(); |
25 runReflectiveTests(DeclarationResolverMetadataTest); | 25 runReflectiveTests(DeclarationResolverMetadataTest); |
26 runReflectiveTests(DeclarationResolverTest); | 26 runReflectiveTests(DeclarationResolverTest); |
27 runReflectiveTests(StrongModeDeclarationResolverTest); | 27 runReflectiveTests(StrongModeDeclarationResolverTest); |
28 } | 28 } |
29 | 29 |
30 CompilationUnit _cloneResolveUnit(CompilationUnit unit) { | 30 CompilationUnit _cloneResolveUnit(CompilationUnit unit) { |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 expect(element.type.toString(), "<T>(T, T) → T"); | 536 expect(element.type.toString(), "<T>(T, T) → T"); |
537 expect(t.element, same(tElement)); | 537 expect(t.element, same(tElement)); |
538 | 538 |
539 // re-resolve | 539 // re-resolve |
540 CompilationUnit unit2 = _cloneResolveUnit(unit); | 540 CompilationUnit unit2 = _cloneResolveUnit(unit); |
541 node = _findSimpleIdentifier(unit2, code, 'max').parent; | 541 node = _findSimpleIdentifier(unit2, code, 'max').parent; |
542 t = node.typeParameters.typeParameters[0]; | 542 t = node.typeParameters.typeParameters[0]; |
543 expect(t.element, same(tElement)); | 543 expect(t.element, same(tElement)); |
544 } | 544 } |
545 } | 545 } |
OLD | NEW |