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

Side by Side Diff: pkg/analysis_server/test/abstract_context.dart

Issue 2903523003: Switch server tests to strong mode. (Closed)
Patch Set: Created 3 years, 7 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import 'dart:async'; 5 import 'dart:async';
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/visitor.dart'; 9 import 'package:analyzer/dart/element/visitor.dart';
10 import 'package:analyzer/exception/exception.dart'; 10 import 'package:analyzer/exception/exception.dart';
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 PerformanceLog log = new PerformanceLog(_logBuffer); 160 PerformanceLog log = new PerformanceLog(_logBuffer);
161 AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log); 161 AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
162 _driver = new AnalysisDriver( 162 _driver = new AnalysisDriver(
163 scheduler, 163 scheduler,
164 log, 164 log,
165 provider, 165 provider,
166 new MemoryByteStore(), 166 new MemoryByteStore(),
167 _fileContentOverlay, 167 _fileContentOverlay,
168 null, 168 null,
169 sourceFactory, 169 sourceFactory,
170 new AnalysisOptionsImpl()); 170 new AnalysisOptionsImpl()..strongMode = true);
171 scheduler.start(); 171 scheduler.start();
172 } else { 172 } else {
173 _context = AnalysisEngine.instance.createAnalysisContext(); 173 _context = AnalysisEngine.instance.createAnalysisContext();
174 context.sourceFactory = sourceFactory; 174 context.sourceFactory = sourceFactory;
175 } 175 }
176 AnalysisEngine.instance.logger = PrintLogger.instance; 176 AnalysisEngine.instance.logger = PrintLogger.instance;
177 } 177 }
178 178
179 void setupResourceProvider() { 179 void setupResourceProvider() {
180 provider = new MemoryResourceProvider(); 180 provider = new MemoryResourceProvider();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 * [engine.GeneralizingElementVisitor]. 216 * [engine.GeneralizingElementVisitor].
217 */ 217 */
218 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { 218 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor {
219 final _ElementVisitorFunction function; 219 final _ElementVisitorFunction function;
220 _ElementVisitorFunctionWrapper(this.function); 220 _ElementVisitorFunctionWrapper(this.function);
221 visitElement(Element element) { 221 visitElement(Element element) {
222 function(element); 222 function(element);
223 super.visitElement(element); 223 super.visitElement(element);
224 } 224 }
225 } 225 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698