mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inline parameter: make it public; allow to inline refs to the same non final fields; allow to inline different constants with the same value (IDEA-40700)
This commit is contained in:
@@ -95,6 +95,32 @@ public class InlineParameterTest extends LightCodeInsightTestCase {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
public void testRefSameNonFinalField() throws Exception {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
public void testRefSameNonFinalFieldOtherObject() throws Exception {
|
||||
try {
|
||||
doTest(false);
|
||||
}
|
||||
catch (CommonRefactoringUtil.RefactoringErrorHintException e) {
|
||||
assertEquals("Cannot find constant initializer for parameter", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void testRef2ConstantsWithTheSameValue() throws Exception {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
public void testRefConstantAndField() throws Exception {
|
||||
try {
|
||||
doTest(false);
|
||||
}
|
||||
catch (CommonRefactoringUtil.RefactoringErrorHintException e) {
|
||||
assertEquals("Cannot find constant initializer for parameter", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private void doTest(final boolean createLocal) throws Exception {
|
||||
getProject().putUserData(InlineParameterExpressionProcessor.CREATE_LOCAL_FOR_TESTS,createLocal);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user