| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 237 |
| 238 Set<Element> currentRevisionValidatedElements = new Set<Element>(); | 238 Set<Element> currentRevisionValidatedElements = new Set<Element>(); |
| 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 (_) => new FolderBasedDartSdk(resourceProvider, sdkDirectory)); | |
| 249 contentCache = new ContentCache(); | 248 contentCache = new ContentCache(); |
| 250 ContextBuilder builder = | 249 ContextBuilder builder = |
| 251 new ContextBuilder(resourceProvider, sdkManager, contentCache); | 250 new ContextBuilder(resourceProvider, sdkManager, contentCache); |
| 252 builder.defaultOptions = new AnalysisOptionsImpl(); | 251 builder.defaultOptions = new AnalysisOptionsImpl(); |
| 253 expectedContext = builder.buildContext(folderPath); | 252 expectedContext = builder.buildContext(folderPath); |
| 254 actualContext = builder.buildContext(folderPath); | 253 actualContext = builder.buildContext(folderPath); |
| 255 expectedContext.analysisOptions = | 254 expectedContext.analysisOptions = |
| 256 new AnalysisOptionsImpl.from(expectedContext.analysisOptions) | 255 new AnalysisOptionsImpl.from(expectedContext.analysisOptions) |
| 257 ..incremental = true; | 256 ..incremental = true; |
| 258 actualContext.analysisOptions = | 257 actualContext.analysisOptions = |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 pairwiseCompare(expectedArguments, (a, b) { | 627 pairwiseCompare(expectedArguments, (a, b) { |
| 629 _verifyTypes(a, b, '$desc typeArguments'); | 628 _verifyTypes(a, b, '$desc typeArguments'); |
| 630 return true; | 629 return true; |
| 631 }, 'elements')); | 630 }, 'elements')); |
| 632 } else { | 631 } else { |
| 633 _failTypeMismatch(actual, expected); | 632 _failTypeMismatch(actual, expected); |
| 634 } | 633 } |
| 635 } | 634 } |
| 636 } | 635 } |
| 637 } | 636 } |
| OLD | NEW |