mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
a test for smart completion in try-with-resources
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
class MyClass {
|
||||
static class MyResource implements AutoCloseable { }
|
||||
|
||||
void f(MyResource resource) {
|
||||
try (final MyResource c = resource<caret>) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class MyClass {
|
||||
static class MyResource implements AutoCloseable { }
|
||||
|
||||
void f(MyResource resource) {
|
||||
try (final MyResource c = r<caret>) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -49,6 +49,8 @@ public class SmartType17CompletionTest extends LightFixtureCompletionTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testTryWithResourcesNoSemicolon() { doTest(); }
|
||||
|
||||
public void testDiamondPresentation() {
|
||||
configureByFile("/" + getTestName(false) + ".java");
|
||||
LookupElementPresentation presentation = new LookupElementPresentation();
|
||||
@@ -57,7 +59,7 @@ public class SmartType17CompletionTest extends LightFixtureCompletionTestCase {
|
||||
}
|
||||
|
||||
|
||||
private void doTest() throws Exception {
|
||||
private void doTest() {
|
||||
configureByFile("/" + getTestName(false) + ".java");
|
||||
if (myItems != null && myItems.length == 1) {
|
||||
final Lookup lookup = getLookup();
|
||||
|
||||
Reference in New Issue
Block a user