| 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 test.analysis_server.src.single_context_manager; | 5 library test.analysis_server.src.single_context_manager; | 
| 6 | 6 | 
| 7 import 'dart:core' hide Resource; | 7 import 'dart:core' hide Resource; | 
| 8 | 8 | 
| 9 import 'package:analysis_server/src/single_context_manager.dart'; | 9 import 'package:analysis_server/src/single_context_manager.dart'; | 
| 10 import 'package:analyzer/file_system/memory_file_system.dart'; | 10 import 'package:analyzer/file_system/memory_file_system.dart'; | 
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 58   String newFolder(List<String> pathComponents) { | 58   String newFolder(List<String> pathComponents) { | 
| 59     String folderPath = posix.joinAll(pathComponents); | 59     String folderPath = posix.joinAll(pathComponents); | 
| 60     resourceProvider.newFolder(folderPath); | 60     resourceProvider.newFolder(folderPath); | 
| 61     return folderPath; | 61     return folderPath; | 
| 62   } | 62   } | 
| 63 | 63 | 
| 64   void setUp() { | 64   void setUp() { | 
| 65     packageResolver = new TestUriResolver(); | 65     packageResolver = new TestUriResolver(); | 
| 66 | 66 | 
| 67     _processRequiredPlugins(); | 67     _processRequiredPlugins(); | 
| 68     DartSdkManager sdkManager = new DartSdkManager((_) { | 68     DartSdkManager sdkManager = | 
| 69       return new MockSdk(); | 69         new DartSdkManager('', false, (_) => new MockSdk()); | 
| 70     }); |  | 
| 71     manager = new SingleContextManager(resourceProvider, sdkManager, | 70     manager = new SingleContextManager(resourceProvider, sdkManager, | 
| 72         (_) => packageResolver, analysisFilesGlobs, new AnalysisOptionsImpl()); | 71         (_) => packageResolver, analysisFilesGlobs, new AnalysisOptionsImpl()); | 
| 73     callbacks = new TestContextManagerCallbacks(resourceProvider); | 72     callbacks = new TestContextManagerCallbacks(resourceProvider); | 
| 74     manager.callbacks = callbacks; | 73     manager.callbacks = callbacks; | 
| 75   } | 74   } | 
| 76 | 75 | 
| 77   void test_isIgnored_false() { | 76   void test_isIgnored_false() { | 
| 78     String project = '/project'; | 77     String project = '/project'; | 
| 79     manager.setRoots(<String>[project], <String>[], <String, String>{}); | 78     manager.setRoots(<String>[project], <String>[], <String, String>{}); | 
| 80     expect(manager.isIgnored('$project/file.dart'), isFalse); | 79     expect(manager.isIgnored('$project/file.dart'), isFalse); | 
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 530     manager.processPlugins(plugins); | 529     manager.processPlugins(plugins); | 
| 531   } | 530   } | 
| 532 } | 531 } | 
| 533 | 532 | 
| 534 class TestUriResolver extends UriResolver { | 533 class TestUriResolver extends UriResolver { | 
| 535   @override | 534   @override | 
| 536   Source resolveAbsolute(Uri uri, [Uri actualUri]) { | 535   Source resolveAbsolute(Uri uri, [Uri actualUri]) { | 
| 537     return null; | 536     return null; | 
| 538   } | 537   } | 
| 539 } | 538 } | 
| OLD | NEW | 
|---|