Implementation Navigation: Add tests for enum entries
#KT-3540 Fixed
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
enum class <caret>E {
|
||||||
|
open fun foo(n: Int): Int = n
|
||||||
|
|
||||||
|
O
|
||||||
|
A {
|
||||||
|
override fun foo(n: Int): Int = n + 1
|
||||||
|
|
||||||
|
}
|
||||||
|
B {
|
||||||
|
override fun foo(n: Int): Int = n + 2
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// REF: (E).A
|
||||||
|
// REF: (E).B
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
enum class E {
|
||||||
|
open fun <caret>foo(n: Int): Int = n
|
||||||
|
|
||||||
|
O
|
||||||
|
A {
|
||||||
|
override fun foo(n: Int): Int = n + 1
|
||||||
|
|
||||||
|
}
|
||||||
|
B {
|
||||||
|
override fun foo(n: Int): Int = n + 2
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// REF: (in E.A).foo(Int)
|
||||||
|
// REF: (in E.B).foo(Int)
|
||||||
@@ -53,6 +53,14 @@ public class JetGotoImplementationTest extends LightCodeInsightTestCase {
|
|||||||
doTest();
|
doTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testOverridesInEnumEntries() {
|
||||||
|
doTest();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testEnumEntriesInheritance() {
|
||||||
|
doTest();
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
protected String getTestDataPath() {
|
protected String getTestDataPath() {
|
||||||
|
|||||||
Reference in New Issue
Block a user