OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.generated.element_resolver_test; | 5 library analyzer.test.generated.element_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/ast/token.dart'; | 8 import 'package:analyzer/dart/ast/token.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/file_system/memory_file_system.dart'; | 11 import 'package:analyzer/file_system/memory_file_system.dart'; |
12 import 'package:analyzer/src/dart/element/element.dart'; | 12 import 'package:analyzer/src/dart/element/element.dart'; |
13 import 'package:analyzer/src/generated/element_resolver.dart'; | 13 import 'package:analyzer/src/generated/element_resolver.dart'; |
14 import 'package:analyzer/src/generated/engine.dart'; | 14 import 'package:analyzer/src/generated/engine.dart'; |
15 import 'package:analyzer/src/generated/java_core.dart'; | 15 import 'package:analyzer/src/generated/java_core.dart'; |
16 import 'package:analyzer/src/generated/java_engine.dart'; | 16 import 'package:analyzer/src/generated/java_engine.dart'; |
17 import 'package:analyzer/src/generated/resolver.dart'; | 17 import 'package:analyzer/src/generated/resolver.dart'; |
18 import 'package:analyzer/src/generated/source.dart'; | 18 import 'package:analyzer/src/generated/source.dart'; |
19 import 'package:analyzer/src/generated/testing/ast_factory.dart'; | 19 import 'package:analyzer/src/generated/testing/ast_factory.dart'; |
20 import 'package:analyzer/src/generated/testing/element_factory.dart'; | 20 import 'package:analyzer/src/generated/testing/element_factory.dart'; |
21 import 'package:analyzer/src/generated/testing/test_type_provider.dart'; | 21 import 'package:analyzer/src/generated/testing/test_type_provider.dart'; |
22 import 'package:analyzer/src/source/source_resource.dart'; | 22 import 'package:analyzer/src/source/source_resource.dart'; |
| 23 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
23 import 'package:unittest/unittest.dart'; | 24 import 'package:unittest/unittest.dart'; |
24 | 25 |
25 import '../reflective_tests.dart'; | |
26 import '../utils.dart'; | 26 import '../utils.dart'; |
27 import 'analysis_context_factory.dart'; | 27 import 'analysis_context_factory.dart'; |
28 import 'test_support.dart'; | 28 import 'test_support.dart'; |
29 | 29 |
30 main() { | 30 main() { |
31 initializeTestEnvironment(); | 31 initializeTestEnvironment(); |
32 runReflectiveTests(ElementResolverTest); | 32 defineReflectiveTests(ElementResolverTest); |
33 } | 33 } |
34 | 34 |
35 @reflectiveTest | 35 @reflectiveTest |
36 class ElementResolverTest extends EngineTestCase { | 36 class ElementResolverTest extends EngineTestCase { |
37 /** | 37 /** |
38 * The error listener to which errors will be reported. | 38 * The error listener to which errors will be reported. |
39 */ | 39 */ |
40 GatheringErrorListener _listener; | 40 GatheringErrorListener _listener; |
41 | 41 |
42 /** | 42 /** |
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 _visitor.labelScope = innerScope; | 1028 _visitor.labelScope = innerScope; |
1029 statement.accept(_resolver); | 1029 statement.accept(_resolver); |
1030 } finally { | 1030 } finally { |
1031 _visitor.labelScope = outerScope; | 1031 _visitor.labelScope = outerScope; |
1032 } | 1032 } |
1033 } catch (exception) { | 1033 } catch (exception) { |
1034 throw new IllegalArgumentException("Could not resolve node", exception); | 1034 throw new IllegalArgumentException("Could not resolve node", exception); |
1035 } | 1035 } |
1036 } | 1036 } |
1037 } | 1037 } |
OLD | NEW |