mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-18 07:15:51 +07:00
39 lines
1.1 KiB
Java
39 lines
1.1 KiB
Java
package com.intellij.codeInsight.unwrap;
|
|
|
|
public class UnwrapForTest extends UnwrapTestCase {
|
|
public void testForWithStatement() throws Exception {
|
|
assertUnwrapped("for(int i = 0; i < 10; i++) Sys<caret>tem.gc();\n",
|
|
|
|
"int i = 0;\n" +
|
|
"Sys<caret>tem.gc();\n");
|
|
}
|
|
|
|
public void testForWithBlock() throws Exception {
|
|
assertUnwrapped("for(int i = 0; i < 10; i++) {\n" +
|
|
" Sys<caret>tem.gc();\n" +
|
|
"}\n",
|
|
|
|
"int i = 0;\n" +
|
|
"Sys<caret>tem.gc();\n");
|
|
}
|
|
|
|
public void testEmptyFor() throws Exception {
|
|
assertUnwrapped("for<caret>(int i = 0; i < 10; i++);\n",
|
|
|
|
"int i = 0;<caret>\n");
|
|
}
|
|
|
|
public void testForEachWithStatement() throws Exception {
|
|
assertUnwrapped("for(String s : strings) Sys<caret>tem.gc();\n",
|
|
|
|
"Sys<caret>tem.gc();\n");
|
|
}
|
|
|
|
public void testForEachWithBlock() throws Exception {
|
|
assertUnwrapped("for(String s : strings) {\n" +
|
|
" Sys<caret>tem.gc();\n" +
|
|
"}\n",
|
|
|
|
"Sys<caret>tem.gc();\n");
|
|
}
|
|
} |