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 analyzer.test.src.dart.element.element_test; | 5 library analyzer.test.src.dart.element.element_test; |
6 | 6 |
7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
8 import 'package:analyzer/dart/constant/value.dart'; | 8 import 'package:analyzer/dart/constant/value.dart'; |
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'; |
11 import 'package:analyzer/src/dart/element/element.dart'; | 11 import 'package:analyzer/src/dart/element/element.dart'; |
12 import 'package:analyzer/src/dart/element/handle.dart'; | 12 import 'package:analyzer/src/dart/element/handle.dart'; |
13 import 'package:analyzer/src/dart/element/type.dart'; | 13 import 'package:analyzer/src/dart/element/type.dart'; |
14 import 'package:analyzer/src/generated/engine.dart' | 14 import 'package:analyzer/src/generated/engine.dart' |
15 show AnalysisContext, AnalysisOptionsImpl; | 15 show AnalysisContext, AnalysisOptionsImpl; |
16 import 'package:analyzer/src/generated/java_core.dart'; | 16 import 'package:analyzer/src/generated/java_core.dart'; |
17 import 'package:analyzer/src/generated/source_io.dart'; | 17 import 'package:analyzer/src/generated/source_io.dart'; |
18 import 'package:analyzer/src/generated/testing/ast_factory.dart'; | 18 import 'package:analyzer/src/generated/testing/ast_factory.dart'; |
19 import 'package:analyzer/src/generated/testing/element_factory.dart'; | 19 import 'package:analyzer/src/generated/testing/element_factory.dart'; |
20 import 'package:analyzer/src/generated/testing/test_type_provider.dart'; | 20 import 'package:analyzer/src/generated/testing/test_type_provider.dart'; |
| 21 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
21 import 'package:unittest/unittest.dart'; | 22 import 'package:unittest/unittest.dart'; |
22 | 23 |
23 import '../../../generated/analysis_context_factory.dart' | 24 import '../../../generated/analysis_context_factory.dart' |
24 show AnalysisContextHelper; | 25 show AnalysisContextHelper; |
25 import '../../../generated/resolver_test_case.dart'; | 26 import '../../../generated/resolver_test_case.dart'; |
26 import '../../../generated/test_support.dart'; | 27 import '../../../generated/test_support.dart'; |
27 import '../../../reflective_tests.dart'; | |
28 import '../../../utils.dart'; | 28 import '../../../utils.dart'; |
29 | 29 |
30 main() { | 30 main() { |
31 initializeTestEnvironment(); | 31 initializeTestEnvironment(); |
32 runReflectiveTests(ElementAnnotationImplTest); | 32 defineReflectiveTests(ElementAnnotationImplTest); |
33 runReflectiveTests(FieldElementImplTest); | 33 defineReflectiveTests(FieldElementImplTest); |
34 runReflectiveTests(FunctionTypeImplTest); | 34 defineReflectiveTests(FunctionTypeImplTest); |
35 runReflectiveTests(InterfaceTypeImplTest); | 35 defineReflectiveTests(InterfaceTypeImplTest); |
36 runReflectiveTests(LocalVariableElementImplTest); | 36 defineReflectiveTests(LocalVariableElementImplTest); |
37 runReflectiveTests(TypeParameterTypeImplTest); | 37 defineReflectiveTests(TypeParameterTypeImplTest); |
38 runReflectiveTests(VoidTypeImplTest); | 38 defineReflectiveTests(VoidTypeImplTest); |
39 runReflectiveTests(ClassElementImplTest); | 39 defineReflectiveTests(ClassElementImplTest); |
40 runReflectiveTests(CompilationUnitElementImplTest); | 40 defineReflectiveTests(CompilationUnitElementImplTest); |
41 runReflectiveTests(ElementLocationImplTest); | 41 defineReflectiveTests(ElementLocationImplTest); |
42 runReflectiveTests(ElementImplTest); | 42 defineReflectiveTests(ElementImplTest); |
43 runReflectiveTests(LibraryElementImplTest); | 43 defineReflectiveTests(LibraryElementImplTest); |
44 runReflectiveTests(MethodElementImplTest); | 44 defineReflectiveTests(MethodElementImplTest); |
45 runReflectiveTests(MultiplyDefinedElementImplTest); | 45 defineReflectiveTests(MultiplyDefinedElementImplTest); |
46 runReflectiveTests(ParameterElementImplTest); | 46 defineReflectiveTests(ParameterElementImplTest); |
47 runReflectiveTests(PropertyAccessorElementImplTest); | 47 defineReflectiveTests(PropertyAccessorElementImplTest); |
48 runReflectiveTests(TopLevelVariableElementImplTest); | 48 defineReflectiveTests(TopLevelVariableElementImplTest); |
49 } | 49 } |
50 | 50 |
51 @reflectiveTest | 51 @reflectiveTest |
52 class ClassElementImplTest extends EngineTestCase { | 52 class ClassElementImplTest extends EngineTestCase { |
53 void test_computeNode_ClassDeclaration() { | 53 void test_computeNode_ClassDeclaration() { |
54 AnalysisContextHelper contextHelper = new AnalysisContextHelper(); | 54 AnalysisContextHelper contextHelper = new AnalysisContextHelper(); |
55 AnalysisContext context = contextHelper.context; | 55 AnalysisContext context = contextHelper.context; |
56 Source source = contextHelper.addSource( | 56 Source source = contextHelper.addSource( |
57 "/test.dart", | 57 "/test.dart", |
58 r''' | 58 r''' |
(...skipping 4428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4487 } | 4487 } |
4488 | 4488 |
4489 class _FunctionTypeImplTest_isSubtypeOf_baseCase_classFunction | 4489 class _FunctionTypeImplTest_isSubtypeOf_baseCase_classFunction |
4490 extends InterfaceTypeImpl { | 4490 extends InterfaceTypeImpl { |
4491 _FunctionTypeImplTest_isSubtypeOf_baseCase_classFunction(ClassElement arg0) | 4491 _FunctionTypeImplTest_isSubtypeOf_baseCase_classFunction(ClassElement arg0) |
4492 : super(arg0); | 4492 : super(arg0); |
4493 | 4493 |
4494 @override | 4494 @override |
4495 bool get isDartCoreFunction => true; | 4495 bool get isDartCoreFunction => true; |
4496 } | 4496 } |
OLD | NEW |