mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
testdata for light extract method
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
class Sample {
|
||||
void foo() {
|
||||
Runnable[] runs = {<caret>};
|
||||
}
|
||||
}
|
||||
+13
@@ -201,6 +201,19 @@ public class ExtractMethodObject4DebuggerTest extends LightRefactoringTestCase {
|
||||
" }", false);
|
||||
}
|
||||
|
||||
public void testNewArrayInitializer() throws Exception {
|
||||
doTest("new Runnable[] {new Runnable() {public void run(){} } }",
|
||||
"Runnable[] result = new Test().invoke();",
|
||||
"public class Test {\n" +
|
||||
" public Runnable[] invoke() {\n" +
|
||||
" return new Runnable[]{new Runnable() {\n" +
|
||||
" public void run() {\n" +
|
||||
" }\n" +
|
||||
" }};\n" +
|
||||
" }\n" +
|
||||
" }", false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Sdk getProjectJDK() {
|
||||
return IdeaTestUtil.getMockJdk18();
|
||||
|
||||
Reference in New Issue
Block a user