| 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 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/dart/element/type.dart'; | 10 import 'package:analyzer/dart/element/type.dart'; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 defineReflectiveTests(SetFieldTypeTest); | 23 defineReflectiveTests(SetFieldTypeTest); |
| 24 defineReflectiveTests(VariableGathererTest); | 24 defineReflectiveTests(VariableGathererTest); |
| 25 }); | 25 }); |
| 26 } | 26 } |
| 27 | 27 |
| 28 @reflectiveTest | 28 @reflectiveTest |
| 29 class InstanceMemberInferrerTest extends ResolverTestCase { | 29 class InstanceMemberInferrerTest extends ResolverTestCase { |
| 30 InstanceMemberInferrer createInferrer(LibraryElement library) { | 30 InstanceMemberInferrer createInferrer(LibraryElement library) { |
| 31 AnalysisContext context = library.context; | 31 AnalysisContext context = library.context; |
| 32 return new InstanceMemberInferrer( | 32 return new InstanceMemberInferrer( |
| 33 context.typeProvider, new InheritanceManager(library), | 33 context.typeProvider, new InheritanceManager(library), new Set(), |
| 34 typeSystem: context.typeSystem); | 34 typeSystem: context.typeSystem); |
| 35 } | 35 } |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * Add a source with the given [content] and return the result of resolving | 38 * Add a source with the given [content] and return the result of resolving |
| 39 * the source. | 39 * the source. |
| 40 */ | 40 */ |
| 41 Future<CompilationUnitElement> resolve(String content) async { | 41 Future<CompilationUnitElement> resolve(String content) async { |
| 42 Source source = addNamedSource('/test.dart', content); | 42 Source source = addNamedSource('/test.dart', content); |
| 43 if (enableNewAnalysisDriver) { | 43 if (enableNewAnalysisDriver) { |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 } | 1031 } |
| 1032 } | 1032 } |
| 1033 } | 1033 } |
| 1034 '''); | 1034 '''); |
| 1035 var analysisResult = await computeAnalysisResult(source); | 1035 var analysisResult = await computeAnalysisResult(source); |
| 1036 VariableGatherer gatherer = new VariableGatherer(filter); | 1036 VariableGatherer gatherer = new VariableGatherer(filter); |
| 1037 analysisResult.unit.accept(gatherer); | 1037 analysisResult.unit.accept(gatherer); |
| 1038 return gatherer.results; | 1038 return gatherer.results; |
| 1039 } | 1039 } |
| 1040 } | 1040 } |
| OLD | NEW |