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

Side by Side Diff: pkg/analyzer/test/src/task/strong_mode_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.task.strong_mode_test; 5 library analyzer.test.src.task.strong_mode_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/element/element.dart'; 8 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/dart/element/type.dart'; 9 import 'package:analyzer/dart/element/type.dart';
10 import 'package:analyzer/src/dart/resolver/inheritance_manager.dart'; 10 import 'package:analyzer/src/dart/resolver/inheritance_manager.dart';
11 import 'package:analyzer/src/generated/source.dart'; 11 import 'package:analyzer/src/generated/source.dart';
12 import 'package:analyzer/src/task/strong_mode.dart'; 12 import 'package:analyzer/src/task/strong_mode.dart';
13 import 'package:test/test.dart';
13 import 'package:test_reflective_loader/test_reflective_loader.dart'; 14 import 'package:test_reflective_loader/test_reflective_loader.dart';
14 import 'package:unittest/unittest.dart';
15 15
16 import '../../utils.dart'; 16 import '../../utils.dart';
17 import '../context/abstract_context.dart'; 17 import '../context/abstract_context.dart';
18 18
19 main() { 19 main() {
20 initializeTestEnvironment(); 20 initializeTestEnvironment();
21 defineReflectiveTests(InstanceMemberInferrerTest); 21 defineReflectiveSuite(() {
22 defineReflectiveTests(SetFieldTypeTest); 22 defineReflectiveTests(InstanceMemberInferrerTest);
23 defineReflectiveTests(VariableGathererTest); 23 defineReflectiveTests(SetFieldTypeTest);
24 defineReflectiveTests(VariableGathererTest);
25 });
24 } 26 }
25 27
26 @reflectiveTest 28 @reflectiveTest
27 class InstanceMemberInferrerTest extends AbstractContextTest { 29 class InstanceMemberInferrerTest extends AbstractContextTest {
28 InstanceMemberInferrer createInferrer(LibraryElement library) { 30 InstanceMemberInferrer createInferrer(LibraryElement library) {
29 return new InstanceMemberInferrer( 31 return new InstanceMemberInferrer(
30 context.typeProvider, new InheritanceManager(library), 32 context.typeProvider, new InheritanceManager(library),
31 typeSystem: context.typeSystem); 33 typeSystem: context.typeSystem);
32 } 34 }
33 35
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 } 1033 }
1032 } 1034 }
1033 } 1035 }
1034 '''); 1036 ''');
1035 CompilationUnit unit = context.resolveCompilationUnit2(source, source); 1037 CompilationUnit unit = context.resolveCompilationUnit2(source, source);
1036 VariableGatherer gatherer = new VariableGatherer(filter); 1038 VariableGatherer gatherer = new VariableGatherer(filter);
1037 unit.accept(gatherer); 1039 unit.accept(gatherer);
1038 return gatherer.results; 1040 return gatherer.results;
1039 } 1041 }
1040 } 1042 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698