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

Side by Side Diff: pkg/analyzer/test/stress/for_git_repository.dart

Issue 2425423009: Split out options from ContextBuilder (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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.stress.limited_invalidation; 5 library analyzer.test.stress.limited_invalidation;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 void createContexts() { 240 void createContexts() {
241 assert(expectedContext == null); 241 assert(expectedContext == null);
242 assert(actualContext == null); 242 assert(actualContext == null);
243 resourceProvider = PhysicalResourceProvider.INSTANCE; 243 resourceProvider = PhysicalResourceProvider.INSTANCE;
244 pathContext = resourceProvider.pathContext; 244 pathContext = resourceProvider.pathContext;
245 fs.Folder sdkDirectory = 245 fs.Folder sdkDirectory =
246 FolderBasedDartSdk.defaultSdkDirectory(resourceProvider); 246 FolderBasedDartSdk.defaultSdkDirectory(resourceProvider);
247 sdkManager = new DartSdkManager(sdkDirectory.path, false); 247 sdkManager = new DartSdkManager(sdkDirectory.path, false);
248 contentCache = new ContentCache(); 248 contentCache = new ContentCache();
249 ContextBuilder builder = 249 ContextBuilderOptions builderOptions = new ContextBuilderOptions();
250 new ContextBuilder(resourceProvider, sdkManager, contentCache); 250 builderOptions.defaultOptions = new AnalysisOptionsImpl();
251 builder.defaultOptions = new AnalysisOptionsImpl(); 251 ContextBuilder builder = new ContextBuilder(
252 resourceProvider, sdkManager, contentCache,
253 options: builderOptions);
252 expectedContext = builder.buildContext(folderPath); 254 expectedContext = builder.buildContext(folderPath);
253 actualContext = builder.buildContext(folderPath); 255 actualContext = builder.buildContext(folderPath);
254 expectedContext.analysisOptions = 256 expectedContext.analysisOptions =
255 new AnalysisOptionsImpl.from(expectedContext.analysisOptions) 257 new AnalysisOptionsImpl.from(expectedContext.analysisOptions)
256 ..incremental = true; 258 ..incremental = true;
257 actualContext.analysisOptions = 259 actualContext.analysisOptions =
258 new AnalysisOptionsImpl.from(actualContext.analysisOptions) 260 new AnalysisOptionsImpl.from(actualContext.analysisOptions)
259 ..incremental = true 261 ..incremental = true
260 ..finerGrainedInvalidation = true; 262 ..finerGrainedInvalidation = true;
261 print('Created contexts'); 263 print('Created contexts');
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 pairwiseCompare(expectedArguments, (a, b) { 629 pairwiseCompare(expectedArguments, (a, b) {
628 _verifyTypes(a, b, '$desc typeArguments'); 630 _verifyTypes(a, b, '$desc typeArguments');
629 return true; 631 return true;
630 }, 'elements')); 632 }, 'elements'));
631 } else { 633 } else {
632 _failTypeMismatch(actual, expected); 634 _failTypeMismatch(actual, expected);
633 } 635 }
634 } 636 }
635 } 637 }
636 } 638 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/context/builder_test.dart ('k') | pkg/analyzer/tool/task_dependency_graph/generate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698