Find Usages: Add tests for enum entries
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// PSI_ELEMENT: org.jetbrains.jet.lang.psi.JetNamedFunction
|
||||
// OPTIONS: usages
|
||||
enum class E {
|
||||
{
|
||||
foo(1)
|
||||
}
|
||||
|
||||
open fun <caret>foo(n: Int): Int = n
|
||||
|
||||
O
|
||||
A {
|
||||
{
|
||||
foo(1)
|
||||
}
|
||||
|
||||
override fun foo(n: Int): Int = n + 1
|
||||
}
|
||||
B {
|
||||
{
|
||||
foo(1)
|
||||
}
|
||||
|
||||
override fun foo(n: Int): Int = n + 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
Function call (13: 13) foo(1)
|
||||
Function call (20: 13) foo(1)
|
||||
Function call (5: 9) foo(1)
|
||||
@@ -444,6 +444,12 @@ public class JetFindUsagesTestGenerated extends AbstractJetFindUsagesTest {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findFunctionUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("enumFunctionUsages.0.kt")
|
||||
public void testEnumFunctionUsages() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/enumFunctionUsages.0.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("javaAndKotlinOverrides.0.kt")
|
||||
public void testJavaAndKotlinOverrides() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/javaAndKotlinOverrides.0.kt");
|
||||
|
||||
Reference in New Issue
Block a user