mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-93289 (test)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
class C {
|
||||
void m(File file) throws IOException {
|
||||
<caret>FileInputStream fileInputStream = new FileInputStream(file);
|
||||
int read = fileInputStream.read();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
class C {
|
||||
void m(File file) throws IOException {
|
||||
try (FileInputStream fileInputStream = new FileInputStream(file)) {
|
||||
int read = fileInputStream.read();
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-2
@@ -36,8 +36,12 @@ public class SurroundAutoCloseableActionTest extends JavaCodeInsightFixtureTestC
|
||||
moduleBuilder.setLanguageLevel(LanguageLevel.JDK_1_7);
|
||||
}
|
||||
|
||||
public void testSimple() throws Exception {
|
||||
CodeInsightTestUtil.doIntentionTest(myFixture, myIntention, "Simple.java", "Simple_after.java");
|
||||
public void testSimple() { doTest(); }
|
||||
//public void testUsage() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
String name = getTestName(false);
|
||||
CodeInsightTestUtil.doIntentionTest(myFixture, myIntention, name + ".java", name + "_after.java");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user