mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
a test for IDEA-95228 Copy reference does not work correctly on overloaded methods.
This commit is contained in:
@@ -58,6 +58,32 @@ public class CopyReferenceTest extends LightCodeInsightFixtureTestCase {
|
||||
myFixture.checkResult "/a.java:2"
|
||||
}
|
||||
|
||||
public void _testMethodOverloadCopy() {
|
||||
myFixture.configureByText 'a.java', '''
|
||||
class Koo {
|
||||
public void foo(int a) { }
|
||||
public void foo(boolean a) { }
|
||||
|
||||
{
|
||||
fo<caret>o(true);
|
||||
}
|
||||
}'''
|
||||
performCopy()
|
||||
myFixture.configureByText 'b.java', '''
|
||||
/**
|
||||
* <caret>
|
||||
*/
|
||||
class Koo2 { }
|
||||
'''
|
||||
performPaste()
|
||||
myFixture.checkResult '''
|
||||
/**
|
||||
* Koo#foo(boolean)<caret>
|
||||
*/
|
||||
class Koo2 { }
|
||||
'''
|
||||
}
|
||||
|
||||
private void doTest() throws Exception {
|
||||
String name = getTestName(false);
|
||||
myFixture.configureByFile(name + ".java");
|
||||
|
||||
Reference in New Issue
Block a user