| OLD | NEW |
| 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 library test.context.directory.manager; | 5 library test.context.directory.manager; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/context_manager.dart'; | 9 import 'package:analysis_server/src/context_manager.dart'; |
| 10 import 'package:analyzer/error/error.dart'; | 10 import 'package:analyzer/error/error.dart'; |
| (...skipping 2503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2514 sources.remove(source); | 2514 sources.remove(source); |
| 2515 } | 2515 } |
| 2516 for (Source source in changeSet.changedSources) { | 2516 for (Source source in changeSet.changedSources) { |
| 2517 expect(filePaths, contains(source.fullName)); | 2517 expect(filePaths, contains(source.fullName)); |
| 2518 filePaths[source.fullName] = now; | 2518 filePaths[source.fullName] = now; |
| 2519 } | 2519 } |
| 2520 | 2520 |
| 2521 currentContext.applyChanges(changeSet); | 2521 currentContext.applyChanges(changeSet); |
| 2522 } | 2522 } |
| 2523 | 2523 |
| 2524 @override |
| 2525 void applyFileRemoved(AnalysisDriver driver, String file) { |
| 2526 throw new StateError('Unexpected invocation of applyFileRemoved'); |
| 2527 } |
| 2528 |
| 2524 void assertContextFiles(String contextPath, List<String> expectedFiles) { | 2529 void assertContextFiles(String contextPath, List<String> expectedFiles) { |
| 2525 var actualFiles = currentContextFilePaths[contextPath].keys; | 2530 var actualFiles = currentContextFilePaths[contextPath].keys; |
| 2526 expect(actualFiles, unorderedEquals(expectedFiles)); | 2531 expect(actualFiles, unorderedEquals(expectedFiles)); |
| 2527 } | 2532 } |
| 2528 | 2533 |
| 2529 void assertContextPaths(List<String> expected) { | 2534 void assertContextPaths(List<String> expected) { |
| 2530 expect(currentContextPaths, unorderedEquals(expected)); | 2535 expect(currentContextPaths, unorderedEquals(expected)); |
| 2531 } | 2536 } |
| 2532 | 2537 |
| 2533 @override | 2538 @override |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2590 class TestUriResolver extends UriResolver { | 2595 class TestUriResolver extends UriResolver { |
| 2591 Map<Uri, Source> uriMap; | 2596 Map<Uri, Source> uriMap; |
| 2592 | 2597 |
| 2593 TestUriResolver(this.uriMap); | 2598 TestUriResolver(this.uriMap); |
| 2594 | 2599 |
| 2595 @override | 2600 @override |
| 2596 Source resolveAbsolute(Uri uri, [Uri actualUri]) { | 2601 Source resolveAbsolute(Uri uri, [Uri actualUri]) { |
| 2597 return uriMap[uri]; | 2602 return uriMap[uri]; |
| 2598 } | 2603 } |
| 2599 } | 2604 } |
| OLD | NEW |