Update NavigateToDecompiledLibraryTest
This commit is contained in:
+3
-6
@@ -90,14 +90,11 @@ public class NavigateToDecompiledLibraryTest extends AbstractNavigateToLibraryTe
|
|||||||
|
|
||||||
private void doTest() {
|
private void doTest() {
|
||||||
classFile = getClassFile(PACKAGE, getTestName(false), myModule);
|
classFile = getClassFile(PACKAGE, getTestName(false), myModule);
|
||||||
PsiFile clsFileForClassFile = PsiManager.getInstance(getProject()).findFile(classFile);
|
PsiFile decompiledPsiFile = PsiManager.getInstance(getProject()).findFile(classFile);
|
||||||
assertNotNull(clsFileForClassFile);
|
|
||||||
assertTrue("Expecting kotlin class file, was: " + clsFileForClassFile.getClass(), clsFileForClassFile instanceof JetClsFile);
|
|
||||||
PsiFile decompiledPsiFile = ((ClsFileImpl) clsFileForClassFile).getDecompiledPsiFile();
|
|
||||||
assertNotNull(decompiledPsiFile);
|
assertNotNull(decompiledPsiFile);
|
||||||
assertTrue("Expecting decompiled Kotlin file, was: " + decompiledPsiFile.getClass(), decompiledPsiFile instanceof JetFile);
|
assertTrue("Expecting kotlin class file, was: " + decompiledPsiFile.getClass(), decompiledPsiFile instanceof JetClsFile);
|
||||||
Map<String, JetDeclaration> map = getRenderedDescriptorToKotlinPsiMap(
|
Map<String, JetDeclaration> map = getRenderedDescriptorToKotlinPsiMap(
|
||||||
(JetFile) decompiledPsiFile, ((JetClsFile) clsFileForClassFile).getRenderedDescriptorsToRange()
|
(JetFile) decompiledPsiFile, ((JetClsFile) decompiledPsiFile).getRenderedDescriptorsToRange()
|
||||||
);
|
);
|
||||||
String decompiledTextWithMarks = getDecompiledTextWithMarks(map);
|
String decompiledTextWithMarks = getDecompiledTextWithMarks(map);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ public abstract class AbstractReferenceResolveInLibrarySourcesTest : JetLightCod
|
|||||||
val gotoData = NavigationTestUtils.invokeGotoImplementations(fixture.getEditor(), fixture.getFile())!!
|
val gotoData = NavigationTestUtils.invokeGotoImplementations(fixture.getEditor(), fixture.getFile())!!
|
||||||
Assert.assertEquals("Single target expected for origianl file", 1, gotoData.targets.size)
|
Assert.assertEquals("Single target expected for origianl file", 1, gotoData.targets.size)
|
||||||
|
|
||||||
val testedPsiElement = gotoData.targets[0]
|
val testedPsiElement = gotoData.targets[0].getNavigationElement()
|
||||||
val testedElementFile = testedPsiElement.getContainingFile()!!
|
val testedElementFile = testedPsiElement.getContainingFile()!!
|
||||||
|
|
||||||
val lineContext = InTextDirectivesUtils.findStringWithPrefixes(fixture.getFile()!!.getText(), "CONTEXT:")
|
val lineContext = InTextDirectivesUtils.findStringWithPrefixes(fixture.getFile()!!.getText(), "CONTEXT:")
|
||||||
|
|||||||
Reference in New Issue
Block a user