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

Side by Side Diff: pkg/analyzer/test/src/dart/constant/utilities_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.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_reflective_loader/test_reflective_loader.dart'; 23 import 'package:test_reflective_loader/test_reflective_loader.dart';
23 import 'package:unittest/unittest.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'; 27 import '../../../utils.dart';
28 28
29 main() { 29 main() {
30 initializeTestEnvironment(); 30 initializeTestEnvironment();
31 defineReflectiveTests(ConstantFinderTest); 31 defineReflectiveSuite(() {
32 defineReflectiveTests(ReferenceFinderTest); 32 defineReflectiveTests(ConstantFinderTest);
33 defineReflectiveTests(ReferenceFinderTest);
34 });
33 } 35 }
34 36
35 @reflectiveTest 37 @reflectiveTest
36 class ConstantFinderTest { 38 class ConstantFinderTest {
37 AstNode _node; 39 AstNode _node;
38 TypeProvider _typeProvider; 40 TypeProvider _typeProvider;
39 AnalysisContext _context; 41 AnalysisContext _context;
40 Source _source; 42 Source _source;
41 43
42 void setUp() { 44 void setUp() {
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 356
355 void _visitNode(AstNode node) { 357 void _visitNode(AstNode node) {
356 node.accept(_createReferenceFinder(_head)); 358 node.accept(_createReferenceFinder(_head));
357 } 359 }
358 } 360 }
359 361
360 class _TestAnalysisContext extends TestAnalysisContext { 362 class _TestAnalysisContext extends TestAnalysisContext {
361 @override 363 @override
362 InternalAnalysisContext getContextFor(Source source) => this; 364 InternalAnalysisContext getContextFor(Source source) => this;
363 } 365 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698