mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
in-code test environment
This commit is contained in:
-3
@@ -1,3 +0,0 @@
|
||||
public class OurException extends Throwable{
|
||||
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
public class OurNotException {
|
||||
public static class InnerException extends Throwable{
|
||||
}
|
||||
public static class InnerNonException{
|
||||
}
|
||||
}
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
package pack;
|
||||
|
||||
public class AAClass {
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
package pack;
|
||||
|
||||
public class WithInnerAClass{
|
||||
public static class Inner{}
|
||||
}
|
||||
+16
@@ -26,6 +26,7 @@ import com.intellij.testFramework.PsiTestUtil;
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@TestDataPath("$CONTENT_ROOT/testData")
|
||||
public class ClassNameCompletionTest extends CompletionTestCase {
|
||||
@@ -54,6 +55,11 @@ public class ClassNameCompletionTest extends CompletionTestCase {
|
||||
}
|
||||
|
||||
public void testImportAfterNew() throws Exception {
|
||||
createClass("package pack; public class AAClass {}");
|
||||
createClass("package pack; public class WithInnerAClass{\n" +
|
||||
" public static class Inner{}\n" +
|
||||
"}");
|
||||
|
||||
String path = BASE_PATH + "/importAfterNew";
|
||||
|
||||
configureByFile(path + "/before1.java");
|
||||
@@ -65,13 +71,23 @@ public class ClassNameCompletionTest extends CompletionTestCase {
|
||||
}
|
||||
|
||||
public void testAfterNewThrowable1() throws Exception {
|
||||
addClassesForAfterNewThrowable();
|
||||
String path = BASE_PATH + "/afterNewThrowable";
|
||||
|
||||
configureByFile(path + "/before1.java");
|
||||
checkResultByFile(path + "/after1.java");
|
||||
}
|
||||
|
||||
private void addClassesForAfterNewThrowable() throws IOException {
|
||||
createClass("public class OurException extends Throwable{}");
|
||||
createClass("public class OurNotException {\n" +
|
||||
" public static class InnerException extends Throwable{}\n" +
|
||||
" public static class InnerNonException{}\n" +
|
||||
"}");
|
||||
}
|
||||
|
||||
public void testAfterNewThrowable2() throws Exception {
|
||||
addClassesForAfterNewThrowable();
|
||||
String path = BASE_PATH + "/afterNewThrowable";
|
||||
|
||||
configureByFile(path + "/before2.java");
|
||||
|
||||
Reference in New Issue
Block a user