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

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

Issue 1355773002: Make type system changes backwards compatible (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
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, context.typeSystem); 28 new InstanceMemberInferrer(context.typeProvider,
29 typeSystem: context.typeSystem);
29 30
30 /** 31 /**
31 * Add a source with the given [content] and return the result of resolving 32 * Add a source with the given [content] and return the result of resolving
32 * the source. 33 * the source.
33 */ 34 */
34 CompilationUnitElement resolve(String content) { 35 CompilationUnitElement resolve(String content) {
35 Source source = addSource('/test.dart', content); 36 Source source = addSource('/test.dart', content);
36 return context.resolveCompilationUnit2(source, source).element; 37 return context.resolveCompilationUnit2(source, source).element;
37 } 38 }
38 39
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 } 902 }
902 } 903 }
903 } 904 }
904 '''); 905 ''');
905 CompilationUnit unit = context.resolveCompilationUnit2(source, source); 906 CompilationUnit unit = context.resolveCompilationUnit2(source, source);
906 VariableGatherer gatherer = new VariableGatherer(filter); 907 VariableGatherer gatherer = new VariableGatherer(filter);
907 unit.accept(gatherer); 908 unit.accept(gatherer);
908 return gatherer.results; 909 return gatherer.results;
909 } 910 }
910 } 911 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698