mock 1.8 jdk

(cherry picked from commit 86b3924bc3c6dca79f9d5f75bc5e93307a5da4f4)
This commit is contained in:
anna
2013-11-28 12:21:34 +01:00
parent 15869e79cb
commit 834793e8f3
6 changed files with 30 additions and 16 deletions
@@ -44,7 +44,7 @@ public class GenericsHighlighting8Test extends LightDaemonAnalyzerTestCase {
@Override
protected Sdk getProjectJDK() {
return getTestName(false).contains("Jdk14") ? IdeaTestUtil.getMockJdk14() : super.getProjectJDK();
return IdeaTestUtil.getMockJdk18();
}
public void testReferenceTypeParams() {
@@ -762,19 +762,4 @@ public class GenericsHighlighting8Test extends LightDaemonAnalyzerTestCase {
doTest();
}
public void testJavaUtilCollections_NoVerify() throws Exception {
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
assertNotNull(collectionsClass);
collectionsClass = (PsiClass)collectionsClass.getNavigationElement();
final String text = collectionsClass.getContainingFile().getText();
configureFromFileText("Collections.java", text.replaceAll("\r", "\n"));
final PsiResolveHelperImpl helper = (PsiResolveHelperImpl)JavaPsiFacade.getInstance(getProject()).getResolveHelper();
helper.setTestHelper(new PsiGraphInferenceHelper(getPsiManager()));
try {
doTestConfiguredFile(false, false, null);
}
finally {
helper.setTestHelper(null);
}
}
}
@@ -17,6 +17,7 @@ package com.intellij.codeInsight.daemon.lambda;
import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase;
import com.intellij.openapi.projectRoots.JavaSdkVersion;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.testFramework.IdeaTestUtil;
import org.jetbrains.annotations.NonNls;
@@ -115,4 +116,9 @@ public class GraphInferenceHighlightingTest extends LightDaemonAnalyzerTestCase
IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), getTestRootDisposable());
doTestNewInference(BASE_PATH + "/" + getTestName(false) + ".java", checkWarnings, false);
}
@Override
protected Sdk getProjectJDK() {
return IdeaTestUtil.getMockJdk18();
}
}
@@ -18,6 +18,8 @@ package com.intellij.codeInsight.daemon.lambda;
import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase;
import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.codeInspection.unusedSymbol.UnusedSymbolLocalInspection;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.testFramework.IdeaTestUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -103,4 +105,9 @@ public class LambdaHighlightingTest extends LightDaemonAnalyzerTestCase {
private void doTest(final boolean checkWarnings) {
doTestNewInference(BASE_PATH + "/" + getTestName(false) + ".java", checkWarnings, false);
}
@Override
protected Sdk getProjectJDK() {
return IdeaTestUtil.getMockJdk18();
}
}
@@ -19,6 +19,7 @@ import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase;
import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.codeInspection.unusedSymbol.UnusedSymbolLocalInspection;
import com.intellij.openapi.projectRoots.JavaSdkVersion;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.testFramework.IdeaTestUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -101,4 +102,9 @@ public class MethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), getTestRootDisposable());
doTestNewInference(BASE_PATH + "/" + getTestName(false) + ".java", warnings, false);
}
@Override
protected Sdk getProjectJDK() {
return IdeaTestUtil.getMockJdk18();
}
}