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

Side by Side Diff: pkg/analyzer/test/src/context/builder_test.dart

Issue 2396423002: MemoryResourceProvider.getFolder() should not create the folder. (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/source/package_map_provider_test.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) 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.src.context.context_builder_test; 5 library analyzer.test.src.context.context_builder_test;
6 6
7 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
9 import 'package:analyzer/plugin/options.dart'; 9 import 'package:analyzer/plugin/options.dart';
10 import 'package:analyzer/source/package_map_resolver.dart'; 10 import 'package:analyzer/source/package_map_resolver.dart';
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 Packages packages = builder.createPackageMap(projectPath); 261 Packages packages = builder.createPackageMap(projectPath);
262 expect(packages, isNotNull); 262 expect(packages, isNotNull);
263 Map<String, Uri> map = packages.asMap(); 263 Map<String, Uri> map = packages.asMap();
264 expect(map, hasLength(2)); 264 expect(map, hasLength(2));
265 expect(map['foo'], fooUri); 265 expect(map['foo'], fooUri);
266 expect(map['bar'], barUri); 266 expect(map['bar'], barUri);
267 } 267 }
268 268
269 void test_createPackageMap_none() { 269 void test_createPackageMap_none() {
270 String rootPath = resourceProvider.convertPath('/root'); 270 String rootPath = resourceProvider.convertPath('/root');
271 resourceProvider.newFolder(rootPath);
271 Packages packages = builder.createPackageMap(rootPath); 272 Packages packages = builder.createPackageMap(rootPath);
272 expect(packages, same(Packages.noPackages)); 273 expect(packages, same(Packages.noPackages));
273 } 274 }
274 275
275 void test_createSourceFactory_fileProvider() { 276 void test_createSourceFactory_fileProvider() {
276 String rootPath = resourceProvider.convertPath('/root'); 277 String rootPath = resourceProvider.convertPath('/root');
277 Folder rootFolder = resourceProvider.getFolder(rootPath); 278 Folder rootFolder = resourceProvider.getFolder(rootPath);
278 createDefaultSdk(rootFolder); 279 createDefaultSdk(rootFolder);
279 String projectPath = pathContext.join(rootPath, 'project'); 280 String projectPath = pathContext.join(rootPath, 'project');
280 String packageFilePath = pathContext.join(projectPath, '.packages'); 281 String packageFilePath = pathContext.join(projectPath, '.packages');
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 fail('Unexpected invocation of optionsProcessed'); 732 fail('Unexpected invocation of optionsProcessed');
732 } 733 }
733 expect(options, hasLength(expectedOptions.length)); 734 expect(options, hasLength(expectedOptions.length));
734 for (String key in expectedOptions.keys) { 735 for (String key in expectedOptions.keys) {
735 expect(options.containsKey(key), isTrue, reason: 'missing key $key'); 736 expect(options.containsKey(key), isTrue, reason: 'missing key $key');
736 expect(options[key], expectedOptions[key], 737 expect(options[key], expectedOptions[key],
737 reason: 'values for key $key do not match'); 738 reason: 'values for key $key do not match');
738 } 739 }
739 } 740 }
740 } 741 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/source/package_map_provider_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698