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

Side by Side Diff: pkg/analyzer/test/src/dart/constant/utilities_test.dart

Issue 2399913002: Remove 'initializeTestEnvironment' from 'analyzer'. (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.src.dart.constant.utilities_test; 5 library analyzer.test.src.dart.constant.utilities_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/src/dart/ast/token.dart'; 10 import 'package:analyzer/src/dart/ast/token.dart';
11 import 'package:analyzer/src/dart/element/element.dart'; 11 import 'package:analyzer/src/dart/element/element.dart';
12 import 'package:analyzer/src/generated/constant.dart'; 12 import 'package:analyzer/src/generated/constant.dart';
13 import 'package:analyzer/src/generated/engine.dart'; 13 import 'package:analyzer/src/generated/engine.dart';
14 import 'package:analyzer/src/generated/resolver.dart'; 14 import 'package:analyzer/src/generated/resolver.dart';
15 import 'package:analyzer/src/generated/source.dart'; 15 import 'package:analyzer/src/generated/source.dart';
16 import 'package:analyzer/src/generated/source_io.dart'; 16 import 'package:analyzer/src/generated/source_io.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/generated/utilities_collection.dart'; 20 import 'package:analyzer/src/generated/utilities_collection.dart';
21 import 'package:analyzer/src/task/dart.dart'; 21 import 'package:analyzer/src/task/dart.dart';
22 import 'package:test/test.dart'; 22 import 'package:test/test.dart';
23 import 'package:test_reflective_loader/test_reflective_loader.dart'; 23 import 'package:test_reflective_loader/test_reflective_loader.dart';
24 24
25 import '../../../generated/engine_test.dart'; 25 import '../../../generated/engine_test.dart';
26 import '../../../generated/test_support.dart'; 26 import '../../../generated/test_support.dart';
27 import '../../../utils.dart';
28 27
29 main() { 28 main() {
30 initializeTestEnvironment();
31 defineReflectiveSuite(() { 29 defineReflectiveSuite(() {
32 defineReflectiveTests(ConstantFinderTest); 30 defineReflectiveTests(ConstantFinderTest);
33 defineReflectiveTests(ReferenceFinderTest); 31 defineReflectiveTests(ReferenceFinderTest);
34 }); 32 });
35 } 33 }
36 34
37 @reflectiveTest 35 @reflectiveTest
38 class ConstantFinderTest { 36 class ConstantFinderTest {
39 AstNode _node; 37 AstNode _node;
40 TypeProvider _typeProvider; 38 TypeProvider _typeProvider;
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 354
357 void _visitNode(AstNode node) { 355 void _visitNode(AstNode node) {
358 node.accept(_createReferenceFinder(_head)); 356 node.accept(_createReferenceFinder(_head));
359 } 357 }
360 } 358 }
361 359
362 class _TestAnalysisContext extends TestAnalysisContext { 360 class _TestAnalysisContext extends TestAnalysisContext {
363 @override 361 @override
364 InternalAnalysisContext getContextFor(Source source) => this; 362 InternalAnalysisContext getContextFor(Source source) => this;
365 } 363 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/dart/constant/test_all.dart ('k') | pkg/analyzer/test/src/dart/constant/value_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698