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

Side by Side Diff: pkg/analyzer/test/src/context/abstract_context.dart

Issue 1300933002: Test fix for new dart2js hints default. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | pkg/analyzer/test/src/task/dart_test.dart » ('j') | 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.abstract_context_test; 5 library test.src.task.abstract_context_test;
6 6
7 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/context/context.dart'; 10 import 'package:analyzer/src/context/context.dart';
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 List<Source> newSources(Map<String, String> sourceMap) { 92 List<Source> newSources(Map<String, String> sourceMap) {
93 List<Source> sources = <Source>[]; 93 List<Source> sources = <Source>[];
94 sourceMap.forEach((String path, String content) { 94 sourceMap.forEach((String path, String content) {
95 Source source = newSource(path, content); 95 Source source = newSource(path, content);
96 sources.add(source); 96 sources.add(source);
97 }); 97 });
98 return sources; 98 return sources;
99 } 99 }
100 100
101 void setUp() { 101 void prepareAnalysisContext([AnalysisOptions options]) {
102 // prepare AnalysisContext
103 sourceFactory = new SourceFactory(<UriResolver>[ 102 sourceFactory = new SourceFactory(<UriResolver>[
104 new DartUriResolver(sdk), 103 new DartUriResolver(sdk),
105 new ResourceUriResolver(resourceProvider) 104 new ResourceUriResolver(resourceProvider)
106 ]); 105 ]);
107 context = createAnalysisContext(); 106 context = createAnalysisContext();
107 if (options != null) {
108 context.analysisOptions = options;
109 }
108 context.sourceFactory = sourceFactory; 110 context.sourceFactory = sourceFactory;
109 analysisCache = context.analysisCache; 111 analysisCache = context.analysisCache;
110 analysisDriver = context.driver; 112 analysisDriver = context.driver;
111 } 113 }
112 114
115 void setUp() {
116 prepareAnalysisContext();
117 }
118
113 void tearDown() {} 119 void tearDown() {}
114 } 120 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698