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

Side by Side Diff: pkg/analysis_server/test/services/refactoring/move_file_test.dart

Issue 1135073004: Fix for 'Create part' Quick Fix. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
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.services.refactoring.move_files; 5 library test.services.refactoring.move_files;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; 9 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
10 import 'package:analyzer/file_system/file_system.dart'; 10 import 'package:analyzer/file_system/file_system.dart';
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 test_file_importedLibrary_package() async { 99 test_file_importedLibrary_package() async {
100 // configure packages 100 // configure packages
101 testFile = '/packages/my_pkg/aaa/test.dart'; 101 testFile = '/packages/my_pkg/aaa/test.dart';
102 provider.newFile(testFile, ''); 102 provider.newFile(testFile, '');
103 Map<String, List<Folder>> packageMap = { 103 Map<String, List<Folder>> packageMap = {
104 'my_pkg': [provider.getResource('/packages/my_pkg')] 104 'my_pkg': [provider.getResource('/packages/my_pkg')]
105 }; 105 };
106 context.sourceFactory = new SourceFactory([ 106 context.sourceFactory = new SourceFactory([
107 AbstractContextTest.SDK_RESOLVER, 107 AbstractContextTest.SDK_RESOLVER,
108 resourceResolver, 108 new PackageMapUriResolver(provider, packageMap),
109 new PackageMapUriResolver(provider, packageMap) 109 resourceResolver
110 ]); 110 ]);
111 // do testing 111 // do testing
112 String pathA = '/project/bin/a.dart'; 112 String pathA = '/project/bin/a.dart';
113 addSource(pathA, ''' 113 addSource(pathA, '''
114 import 'package:my_pkg/aaa/test.dart'; 114 import 'package:my_pkg/aaa/test.dart';
115 '''); 115 ''');
116 addTestSource(''); 116 addTestSource('');
117 _performAnalysis(); 117 _performAnalysis();
118 // perform refactoring 118 // perform refactoring
119 _createRefactoring('/packages/my_pkg/bbb/ccc/new_name.dart'); 119 _createRefactoring('/packages/my_pkg/bbb/ccc/new_name.dart');
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 break; 242 break;
243 } 243 }
244 for (ChangeNotice notice in result.changeNotices) { 244 for (ChangeNotice notice in result.changeNotices) {
245 if (notice.source.fullName.startsWith('/project/')) { 245 if (notice.source.fullName.startsWith('/project/')) {
246 index.indexUnit(context, notice.resolvedDartUnit); 246 index.indexUnit(context, notice.resolvedDartUnit);
247 } 247 }
248 } 248 }
249 } 249 }
250 } 250 }
251 } 251 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/correction/fix_test.dart ('k') | pkg/analyzer/lib/source/package_map_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698