| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |