mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
LightCodeInsightFixtureTestCase: JAVA_1.4 descriptor mocks 1.4 JDK
This commit is contained in:
@@ -5,7 +5,7 @@ class Simple {
|
||||
public static void main(Set set, Set setO) {
|
||||
class O {}
|
||||
|
||||
Map someData = new HashMap();
|
||||
Map someData = Collections.EMPTY_MAP;
|
||||
|
||||
set.removeAll(someData.keySet());
|
||||
setO.removeAll(someData.keySet());
|
||||
|
||||
@@ -24,10 +24,12 @@ import com.intellij.openapi.ide.CopyPasteManager
|
||||
import com.intellij.psi.PsiFile
|
||||
import com.intellij.testFramework.LightProjectDescriptor
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.annotations.NotNull
|
||||
|
||||
class CopyReferenceActionTest extends LightCodeInsightFixtureTestCase {
|
||||
private int oldSetting
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected LightProjectDescriptor getProjectDescriptor() {
|
||||
return JAVA_9
|
||||
|
||||
+5
@@ -42,6 +42,11 @@ import java.io.File;
|
||||
*/
|
||||
public abstract class LightCodeInsightFixtureTestCase extends UsefulTestCase {
|
||||
public static final LightProjectDescriptor JAVA_1_4 = new DefaultLightProjectDescriptor() {
|
||||
@Override
|
||||
public Sdk getSdk() {
|
||||
return IdeaTestUtil.getMockJdk14();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) {
|
||||
model.getModuleExtension(LanguageLevelModuleExtension.class).setLanguageLevel(LanguageLevel.JDK_1_4);
|
||||
|
||||
+2
@@ -19,6 +19,7 @@ import com.intellij.codeInspection.LocalInspectionTool
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.testFramework.LightProjectDescriptor
|
||||
import com.siyeh.ig.LightInspectionTestCase
|
||||
import org.jetbrains.annotations.NotNull
|
||||
|
||||
@SuppressWarnings(["ResultOfMethodCallIgnored", "UnusedReturnValue"])
|
||||
class IgnoreResultOfCallInspectionTest extends LightInspectionTestCase {
|
||||
@@ -28,6 +29,7 @@ class IgnoreResultOfCallInspectionTest extends LightInspectionTestCase {
|
||||
return new IgnoreResultOfCallInspection()
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected LightProjectDescriptor getProjectDescriptor() {
|
||||
return JAVA_8
|
||||
|
||||
Reference in New Issue
Block a user