Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: pkg/analyzer/test/source/analysis_options_provider_test.dart

Issue 2391883002: MemoryResourceProvider always uses the current platform (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/test/embedder_tests.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/embedder_tests.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698