mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-165033 Completion should prefer expected enum values over the constants from other enums, even if they're more recently used
a test proving it works
This commit is contained in:
+9
@@ -273,6 +273,15 @@ class NormalCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
checkPreferredItems(0, "MyEnum.bar", "MyEnum", "MyEnum.foo")
|
||||
}
|
||||
|
||||
void testPreferExpectedEnumConstantsDespiteStats() {
|
||||
checkPreferredItems 0, "const1", "const2", "constx1", "constx2"
|
||||
myFixture.lookup.currentItem = myFixture.lookupElements[2]
|
||||
|
||||
myFixture.type('\n);\nmethodX(cons')
|
||||
myFixture.completeBasic()
|
||||
assertPreferredItems 0, 'constx1', 'constx2', 'const1', 'const2'
|
||||
}
|
||||
|
||||
void testPreferElse() {
|
||||
checkPreferredItems(0, "else", "element")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user