OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.source.analysis_options_provider_test; | 5 library analyzer.test.source.analysis_options_provider_test; |
6 | 6 |
7 import 'dart:core'; | 7 import 'dart:core'; |
8 | 8 |
9 import 'package:analyzer/file_system/file_system.dart'; | 9 import 'package:analyzer/file_system/file_system.dart'; |
10 import 'package:analyzer/file_system/memory_file_system.dart'; | 10 import 'package:analyzer/file_system/memory_file_system.dart'; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 abstract class AnalysisOptionsProviderTest { | 114 abstract class AnalysisOptionsProviderTest { |
115 TestPathTranslator pathTranslator; | 115 TestPathTranslator pathTranslator; |
116 ResourceProvider resourceProvider; | 116 ResourceProvider resourceProvider; |
117 | 117 |
118 AnalysisOptionsProvider provider = new AnalysisOptionsProvider(); | 118 AnalysisOptionsProvider provider = new AnalysisOptionsProvider(); |
119 | 119 |
120 String get optionsFileName; | 120 String get optionsFileName; |
121 | 121 |
122 void setUp() { | 122 void setUp() { |
123 var rawProvider = new MemoryResourceProvider(isWindows: isWindows); | 123 var rawProvider = new MemoryResourceProvider(); |
124 resourceProvider = new TestResourceProvider(rawProvider); | 124 resourceProvider = new TestResourceProvider(rawProvider); |
125 pathTranslator = new TestPathTranslator(rawProvider); | 125 pathTranslator = new TestPathTranslator(rawProvider); |
126 } | 126 } |
127 | 127 |
128 void test_getOptions_crawlUp_hasInFolder() { | 128 void test_getOptions_crawlUp_hasInFolder() { |
129 pathTranslator.newFolder('/foo/bar'); | 129 pathTranslator.newFolder('/foo/bar'); |
130 pathTranslator.newFile( | 130 pathTranslator.newFile( |
131 '/foo/$optionsFileName', | 131 '/foo/$optionsFileName', |
132 r''' | 132 r''' |
133 analyzer: | 133 analyzer: |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 expect(ignore[1], 'sdk_ext/**'); | 216 expect(ignore[1], 'sdk_ext/**'); |
217 } | 217 } |
218 } | 218 } |
219 } | 219 } |
220 | 220 |
221 Map<String, YamlNode> _getOptions(String posixPath, {bool crawlUp: false}) { | 221 Map<String, YamlNode> _getOptions(String posixPath, {bool crawlUp: false}) { |
222 Resource resource = pathTranslator.getResource(posixPath); | 222 Resource resource = pathTranslator.getResource(posixPath); |
223 return provider.getOptions(resource, crawlUp: crawlUp); | 223 return provider.getOptions(resource, crawlUp: crawlUp); |
224 } | 224 } |
225 } | 225 } |
OLD | NEW |