mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
convert all paths
Change-Id: I6d32fd26e9959ad4b880e90a9ca61504d4e9be0d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135345 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Phil Quitslund <pquitslund@google.com>
This commit is contained in:
parent
9f6a198a8d
commit
42e840c6ae
2 changed files with 24 additions and 22 deletions
|
@ -46,22 +46,6 @@ abstract class AbstractCompletionDriverTest with ResourceProviderMixin {
|
|||
await getSuggestions();
|
||||
}
|
||||
|
||||
void expectSuggestion({
|
||||
@required String completion,
|
||||
ElementKind element,
|
||||
CompletionSuggestionKind kind,
|
||||
String file,
|
||||
}) {
|
||||
expect(
|
||||
suggestionWith(
|
||||
completion: completion,
|
||||
element: element,
|
||||
kind: kind,
|
||||
file: file,
|
||||
),
|
||||
isNotNull);
|
||||
}
|
||||
|
||||
void expectNoSuggestion({
|
||||
@required String completion,
|
||||
ElementKind element,
|
||||
|
@ -78,6 +62,22 @@ abstract class AbstractCompletionDriverTest with ResourceProviderMixin {
|
|||
isEmpty);
|
||||
}
|
||||
|
||||
void expectSuggestion({
|
||||
@required String completion,
|
||||
ElementKind element,
|
||||
CompletionSuggestionKind kind,
|
||||
String file,
|
||||
}) {
|
||||
expect(
|
||||
suggestionWith(
|
||||
completion: completion,
|
||||
element: element,
|
||||
kind: kind,
|
||||
file: file,
|
||||
),
|
||||
isNotNull);
|
||||
}
|
||||
|
||||
Future<List<CompletionSuggestion>> getSuggestions() async {
|
||||
if (supportsAvailableSuggestions) {
|
||||
// todo (pq): consider moving
|
||||
|
@ -139,7 +139,8 @@ project:${toUri('$projectPath/lib')}
|
|||
if (kind != null && s.kind != kind) {
|
||||
return false;
|
||||
}
|
||||
if (file != null && s.element?.location?.file != file) {
|
||||
|
||||
if (file != null && s.element?.location?.file != convertPath(file)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -80,8 +80,8 @@ class CompletionDriver extends AbstractClient with ExpectMixin {
|
|||
@required String testFilePath,
|
||||
}) : _resourceProvider = resourceProvider,
|
||||
super(
|
||||
projectPath: projectPath,
|
||||
testFilePath: testFilePath,
|
||||
projectPath: resourceProvider.convertPath(projectPath),
|
||||
testFilePath: resourceProvider.convertPath(testFilePath),
|
||||
sdkPath: resourceProvider.convertPath('/sdk'));
|
||||
|
||||
@override
|
||||
|
@ -126,11 +126,12 @@ class CompletionDriver extends AbstractClient with ExpectMixin {
|
|||
}
|
||||
|
||||
@override
|
||||
File newFile(String path, String content, [int stamp]) =>
|
||||
resourceProvider.newFile(path, content, stamp);
|
||||
File newFile(String path, String content, [int stamp]) => resourceProvider
|
||||
.newFile(resourceProvider.convertPath(path), content, stamp);
|
||||
|
||||
@override
|
||||
Folder newFolder(String path) => resourceProvider.newFolder(path);
|
||||
Folder newFolder(String path) =>
|
||||
resourceProvider.newFolder(resourceProvider.convertPath(path));
|
||||
|
||||
@override
|
||||
@mustCallSuper
|
||||
|
|
Loading…
Reference in a new issue