Mute custom navigation tests (KT-34542)

This commit is contained in:
Nikolay Krasko
2019-10-22 20:39:41 +03:00
committed by Nikolay Krasko
parent a835f07d51
commit 1811b79503
2 changed files with 19 additions and 9 deletions
@@ -15,6 +15,7 @@ import org.jetbrains.kotlin.idea.test.SdkAndMockLibraryProjectDescriptor
import org.jetbrains.kotlin.psi.KtClass
import org.jetbrains.kotlin.psi.KtClassOrObject
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
import org.jetbrains.kotlin.test.runTest
import org.junit.runner.RunWith
import kotlin.test.assertTrue
@@ -34,18 +35,22 @@ class NavigateFromLibrarySourcesTest: AbstractNavigateFromLibrarySourcesTest() {
// This test is not exactly for navigation, but separating it to another class doesn't worth it.
fun testLightClassForLibrarySource() {
val navigationElement = navigationElementForReferenceInLibrarySource("usage.kt", "Foo")
assertTrue(navigationElement is KtClassOrObject, "Foo should navigate to JetClassOrObject")
val lightClass = navigationElement.toLightClass()
assertTrue(
lightClass is KtLightClassForDecompiledDeclaration,
"Light classes for decompiled declaration should be provided for library source"
)
assertEquals("Foo", lightClass.name)
runTest {
val navigationElement = navigationElementForReferenceInLibrarySource("usage.kt", "Foo")
assertTrue(navigationElement is KtClassOrObject, "Foo should navigate to JetClassOrObject")
val lightClass = navigationElement.toLightClass()
assertTrue(
lightClass is KtLightClassForDecompiledDeclaration,
"Light classes for decompiled declaration should be provided for library source"
)
assertEquals("Foo", lightClass.name)
}
}
private fun checkNavigationFromLibrarySource(referenceText: String, targetFqName: String) {
checkNavigationElement(navigationElementForReferenceInLibrarySource("usage.kt", referenceText), targetFqName)
runTest {
checkNavigationElement(navigationElementForReferenceInLibrarySource("usage.kt", referenceText), targetFqName)
}
}
override fun getProjectDescriptor(): LightProjectDescriptor {
+5
View File
@@ -0,0 +1,5 @@
Test key, Issue, State (optional: MUTE or FAIL)
org.jetbrains.kotlin.idea.decompiler.navigation.NavigateFromLibrarySourcesTest.testBuiltinClass, KT-34542
org.jetbrains.kotlin.idea.decompiler.navigation.NavigateFromLibrarySourcesTest.testJdkClass, KT-34542
org.jetbrains.kotlin.idea.decompiler.navigation.NavigateFromLibrarySourcesTest.testLightClassForLibrarySource, KT-34542
org.jetbrains.kotlin.idea.decompiler.navigation.NavigateFromLibrarySourcesTest.testOurKotlinClass, KT-34542