mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
test that stats is remembered for global static method completion variants
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
public class Foo {
|
||||
|
||||
void foo() {
|
||||
newLi<caret>
|
||||
}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
static void newLinkedSet0() {}
|
||||
static void newLinkedSet1(int a) {}
|
||||
static void newLinkedSet2(int a, int b) {}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import java.util.Set;
|
||||
|
||||
public class Foo {
|
||||
|
||||
void foo() {
|
||||
Set s = newLi<caret>
|
||||
}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
static Set newLinkedSet0() {}
|
||||
static Set newLinkedSet1(int a) {}
|
||||
static Set newLinkedSet2(int a, int b) {}
|
||||
}
|
||||
+8
@@ -624,4 +624,12 @@ interface TxANotAnno {}
|
||||
checkPreferredItems 0, 'MyEnum.BAR', 'MyEnum', 'MyEnum.FOO'
|
||||
}
|
||||
|
||||
public void testGlobalStaticMemberStats() {
|
||||
configureNoCompletion(getTestName(false) + ".java")
|
||||
myFixture.complete(CompletionType.BASIC, 2)
|
||||
assertPreferredItems 0, 'newLinkedSet0', 'newLinkedSet1', 'newLinkedSet2'
|
||||
incUseCount lookup, 1
|
||||
assertPreferredItems 0, 'newLinkedSet1', 'newLinkedSet0', 'newLinkedSet2'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -325,6 +325,14 @@ public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
checkPreferredItems 0, 'toString'
|
||||
}
|
||||
|
||||
public void testGlobalStaticMemberStats() {
|
||||
configureNoCompletion(getTestName(false) + ".java")
|
||||
myFixture.complete(CompletionType.SMART, 2)
|
||||
assertPreferredItems 0, 'newLinkedSet0', 'newLinkedSet1', 'newLinkedSet2'
|
||||
incUseCount lookup, 1
|
||||
assertPreferredItems 0, 'newLinkedSet1', 'newLinkedSet0', 'newLinkedSet2'
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return JavaTestUtil.getRelativeJavaTestDataPath() + BASE_PATH;
|
||||
|
||||
Reference in New Issue
Block a user