mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
in attempt to fix just one test rewrite half the java method call completion; but the code now is much more self-contained, and the test is fixed
This commit is contained in:
+1
-1
@@ -10,6 +10,6 @@ class Bar {
|
||||
}
|
||||
|
||||
{
|
||||
f(fo<caret>)
|
||||
f(foo<caret>x)
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -65,11 +65,11 @@ public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
}
|
||||
|
||||
public void testEnumValueOf() throws Throwable {
|
||||
checkPreferredItems(0, "e", "MyEnum.BAR", "MyEnum.FOO", "MyEnum.valueOf", "Enum.valueOf");
|
||||
checkPreferredItems(0, "e", "MyEnum.BAR", "MyEnum.FOO", "valueOf", "valueOf");
|
||||
}
|
||||
|
||||
public void testEnumValueOf2() throws Throwable {
|
||||
checkPreferredItems(0, "e", "MyEnum.BAR", "MyEnum.FOO", "bar", "MyEnum.valueOf");
|
||||
checkPreferredItems(0, "e", "MyEnum.BAR", "MyEnum.FOO", "bar", "valueOf");
|
||||
}
|
||||
|
||||
public void testPreferMatchedWords() throws Throwable {
|
||||
@@ -115,7 +115,7 @@ public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
}
|
||||
|
||||
public void testBooleanValueOf() throws Throwable {
|
||||
checkPreferredItems(0, "b", "Boolean.valueOf", "Boolean.valueOf", "Boolean.FALSE", "Boolean.TRUE");
|
||||
checkPreferredItems(0, "b", "valueOf", "valueOf", "Boolean.FALSE", "Boolean.TRUE");
|
||||
}
|
||||
|
||||
public void testXmlTagGetAttribute() throws Throwable {
|
||||
@@ -188,7 +188,7 @@ public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
}
|
||||
|
||||
public void testFactoryMethodForDefaultType() throws Throwable {
|
||||
checkPreferredItems(0, "Pair.create", "map", "this", "getClass");
|
||||
checkPreferredItems(0, "create", "map", "this", "getClass");
|
||||
}
|
||||
|
||||
public void testLocalVarsBeforeClassLiterals() throws Throwable {
|
||||
|
||||
+7
-6
@@ -518,9 +518,7 @@ public class SmartTypeCompletionTest extends LightCompletionTestCase {
|
||||
|
||||
public void testNoKeyConstant() throws Throwable {
|
||||
configureByTestName();
|
||||
assertEquals(2, myItems.length);
|
||||
assertEquals("A_KEY", myItems[0].getLookupString());
|
||||
assertEquals("Key.create", myItems[1].getLookupString());
|
||||
assertStringItems("A_KEY", "create");
|
||||
}
|
||||
|
||||
public void testUserDataListAddAll() throws Throwable {
|
||||
@@ -695,7 +693,7 @@ public class SmartTypeCompletionTest extends LightCompletionTestCase {
|
||||
public void testDontAutoCastWhenAlreadyCasted() throws Throwable {
|
||||
configureByTestName();
|
||||
assertEquals("s", myItems[0].getLookupString());
|
||||
assertEquals("String.copyValueOf", myItems[1].getLookupString());
|
||||
assertEquals("copyValueOf", myItems[1].getLookupString());
|
||||
select();
|
||||
checkResultByTestName();
|
||||
}
|
||||
@@ -752,7 +750,7 @@ public class SmartTypeCompletionTest extends LightCompletionTestCase {
|
||||
}
|
||||
public void testNoClassLiteral() throws Exception {
|
||||
doActionTest();
|
||||
assertStringItems("Object.class", "getClass", "Class.forName", "Class.forName");
|
||||
assertStringItems("Object.class", "getClass", "forName", "forName");
|
||||
}
|
||||
|
||||
public void testClassLiteralInAnno2() throws Throwable {
|
||||
@@ -920,7 +918,10 @@ public class SmartTypeCompletionTest extends LightCompletionTestCase {
|
||||
}
|
||||
|
||||
public void testStaticallyImportedMagicMethod() throws Throwable {
|
||||
doItemTest();
|
||||
configureByTestName();
|
||||
assertStringItems("foo");
|
||||
selectItem(myItems[0], '\t');
|
||||
checkResultByTestName();
|
||||
}
|
||||
|
||||
public void _testCallVarargArgument() throws Throwable { doTest(); }
|
||||
|
||||
Reference in New Issue
Block a user