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 analyzer.test.src.task.strong_mode_test; | 5 library analyzer.test.src.task.strong_mode_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/dart/element/type.dart'; | 9 import 'package:analyzer/dart/element/type.dart'; |
10 import 'package:analyzer/src/dart/resolver/inheritance_manager.dart'; | 10 import 'package:analyzer/src/dart/resolver/inheritance_manager.dart'; |
11 import 'package:analyzer/src/generated/source.dart'; | 11 import 'package:analyzer/src/generated/source.dart'; |
12 import 'package:analyzer/src/task/strong_mode.dart'; | 12 import 'package:analyzer/src/task/strong_mode.dart'; |
| 13 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
13 import 'package:unittest/unittest.dart'; | 14 import 'package:unittest/unittest.dart'; |
14 | 15 |
15 import '../../reflective_tests.dart'; | |
16 import '../../utils.dart'; | 16 import '../../utils.dart'; |
17 import '../context/abstract_context.dart'; | 17 import '../context/abstract_context.dart'; |
18 | 18 |
19 main() { | 19 main() { |
20 initializeTestEnvironment(); | 20 initializeTestEnvironment(); |
21 runReflectiveTests(InstanceMemberInferrerTest); | 21 defineReflectiveTests(InstanceMemberInferrerTest); |
22 runReflectiveTests(SetFieldTypeTest); | 22 defineReflectiveTests(SetFieldTypeTest); |
23 runReflectiveTests(VariableGathererTest); | 23 defineReflectiveTests(VariableGathererTest); |
24 } | 24 } |
25 | 25 |
26 @reflectiveTest | 26 @reflectiveTest |
27 class InstanceMemberInferrerTest extends AbstractContextTest { | 27 class InstanceMemberInferrerTest extends AbstractContextTest { |
28 InstanceMemberInferrer createInferrer(LibraryElement library) { | 28 InstanceMemberInferrer createInferrer(LibraryElement library) { |
29 return new InstanceMemberInferrer( | 29 return new InstanceMemberInferrer( |
30 context.typeProvider, new InheritanceManager(library), | 30 context.typeProvider, new InheritanceManager(library), |
31 typeSystem: context.typeSystem); | 31 typeSystem: context.typeSystem); |
32 } | 32 } |
33 | 33 |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 } | 1031 } |
1032 } | 1032 } |
1033 } | 1033 } |
1034 '''); | 1034 '''); |
1035 CompilationUnit unit = context.resolveCompilationUnit2(source, source); | 1035 CompilationUnit unit = context.resolveCompilationUnit2(source, source); |
1036 VariableGatherer gatherer = new VariableGatherer(filter); | 1036 VariableGatherer gatherer = new VariableGatherer(filter); |
1037 unit.accept(gatherer); | 1037 unit.accept(gatherer); |
1038 return gatherer.results; | 1038 return gatherer.results; |
1039 } | 1039 } |
1040 } | 1040 } |
OLD | NEW |