Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: pkg/analyzer/test/generated/element_resolver_test.dart

Issue 2391423003: Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/resolver.dart'; 15 import 'package:analyzer/src/generated/resolver.dart';
16 import 'package:analyzer/src/generated/source.dart'; 16 import 'package:analyzer/src/generated/source.dart';
17 import 'package:analyzer/src/generated/testing/ast_factory.dart'; 17 import 'package:analyzer/src/generated/testing/ast_factory.dart';
18 import 'package:analyzer/src/generated/testing/element_factory.dart'; 18 import 'package:analyzer/src/generated/testing/element_factory.dart';
19 import 'package:analyzer/src/generated/testing/test_type_provider.dart'; 19 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
20 import 'package:analyzer/src/source/source_resource.dart'; 20 import 'package:analyzer/src/source/source_resource.dart';
21 import 'package:test/test.dart';
21 import 'package:test_reflective_loader/test_reflective_loader.dart'; 22 import 'package:test_reflective_loader/test_reflective_loader.dart';
22 import 'package:unittest/unittest.dart';
23 23
24 import '../utils.dart'; 24 import '../utils.dart';
25 import 'analysis_context_factory.dart'; 25 import 'analysis_context_factory.dart';
26 import 'resolver_test_case.dart'; 26 import 'resolver_test_case.dart';
27 import 'test_support.dart'; 27 import 'test_support.dart';
28 28
29 main() { 29 main() {
30 initializeTestEnvironment(); 30 initializeTestEnvironment();
31 defineReflectiveTests(ElementResolverCodeTest); 31 defineReflectiveSuite(() {
32 defineReflectiveTests(ElementResolverTest); 32 defineReflectiveTests(ElementResolverCodeTest);
33 defineReflectiveTests(ElementResolverTest);
34 });
33 } 35 }
34 36
35 @reflectiveTest 37 @reflectiveTest
36 class ElementResolverCodeTest extends ResolverTestCase { 38 class ElementResolverCodeTest extends ResolverTestCase {
37 void test_annotation_class_namedConstructor() { 39 void test_annotation_class_namedConstructor() {
38 addNamedSource( 40 addNamedSource(
39 '/a.dart', 41 '/a.dart',
40 r''' 42 r'''
41 class A { 43 class A {
42 const A.named(); 44 const A.named();
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 innerScope = new LabelScope( 1279 innerScope = new LabelScope(
1278 outerScope, labelElement.name, labelTarget, labelElement); 1280 outerScope, labelElement.name, labelTarget, labelElement);
1279 } 1281 }
1280 _visitor.labelScope = innerScope; 1282 _visitor.labelScope = innerScope;
1281 statement.accept(_resolver); 1283 statement.accept(_resolver);
1282 } finally { 1284 } finally {
1283 _visitor.labelScope = outerScope; 1285 _visitor.labelScope = outerScope;
1284 } 1286 }
1285 } 1287 }
1286 } 1288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698