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

Side by Side Diff: pkg/analyzer/test/src/task/strong_mode_test.dart

Issue 1329743005: Abstract over the type system. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 5 years, 3 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
« no previous file with comments | « pkg/analyzer/test/generated/type_system_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 test.src.task.strong_mode_test; 5 library test.src.task.strong_mode_test;
6 6
7 import 'package:analyzer/src/generated/ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/source.dart'; 9 import 'package:analyzer/src/generated/source.dart';
10 import 'package:analyzer/src/task/dart.dart'; 10 import 'package:analyzer/src/task/dart.dart';
11 import 'package:analyzer/src/task/strong_mode.dart'; 11 import 'package:analyzer/src/task/strong_mode.dart';
12 import 'package:analyzer/task/dart.dart'; 12 import 'package:analyzer/task/dart.dart';
13 import 'package:unittest/unittest.dart'; 13 import 'package:unittest/unittest.dart';
14 14
15 import '../../reflective_tests.dart'; 15 import '../../reflective_tests.dart';
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 runReflectiveTests(InstanceMemberInferrerTest); 21 runReflectiveTests(InstanceMemberInferrerTest);
22 runReflectiveTests(VariableGathererTest); 22 runReflectiveTests(VariableGathererTest);
23 } 23 }
24 24
25 @reflectiveTest 25 @reflectiveTest
26 class InstanceMemberInferrerTest extends AbstractContextTest { 26 class InstanceMemberInferrerTest extends AbstractContextTest {
27 InstanceMemberInferrer get createInferrer => 27 InstanceMemberInferrer get createInferrer =>
28 new InstanceMemberInferrer(context.typeProvider); 28 new InstanceMemberInferrer(context.typeProvider, context.typeSystem);
29 29
30 /** 30 /**
31 * Add a source with the given [content] and return the result of resolving 31 * Add a source with the given [content] and return the result of resolving
32 * the source. 32 * the source.
33 */ 33 */
34 CompilationUnitElement resolve(String content) { 34 CompilationUnitElement resolve(String content) {
35 Source source = addSource('/test.dart', content); 35 Source source = addSource('/test.dart', content);
36 return context.resolveCompilationUnit2(source, source).element; 36 return context.resolveCompilationUnit2(source, source).element;
37 } 37 }
38 38
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 } 901 }
902 } 902 }
903 } 903 }
904 '''); 904 ''');
905 CompilationUnit unit = context.resolveCompilationUnit2(source, source); 905 CompilationUnit unit = context.resolveCompilationUnit2(source, source);
906 VariableGatherer gatherer = new VariableGatherer(filter); 906 VariableGatherer gatherer = new VariableGatherer(filter);
907 unit.accept(gatherer); 907 unit.accept(gatherer);
908 return gatherer.results; 908 return gatherer.results;
909 } 909 }
910 } 910 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/type_system_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698