Do not override path calculation in light virtual files in tests:
seems unnecessary anymore and breaks some script testing logic
This commit is contained in:
@@ -457,14 +457,7 @@ public class KotlinTestUtils {
|
||||
public static KtFile createFile(@NotNull @NonNls String name, @NotNull String text, @NotNull Project project) {
|
||||
String shortName = name.substring(name.lastIndexOf('/') + 1);
|
||||
shortName = shortName.substring(shortName.lastIndexOf('\\') + 1);
|
||||
LightVirtualFile virtualFile = new LightVirtualFile(shortName, KotlinLanguage.INSTANCE, StringUtilRt.convertLineSeparators(text)) {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getPath() {
|
||||
//TODO: patch LightVirtualFile
|
||||
return "/" + name;
|
||||
}
|
||||
};
|
||||
LightVirtualFile virtualFile = new LightVirtualFile(shortName, KotlinLanguage.INSTANCE, StringUtilRt.convertLineSeparators(text));
|
||||
|
||||
virtualFile.setCharset(CharsetToolkit.UTF8_CHARSET);
|
||||
PsiFileFactoryImpl factory = (PsiFileFactoryImpl) PsiFileFactory.getInstance(project);
|
||||
|
||||
Reference in New Issue
Block a user