summaryrefslogtreecommitdiff
path: root/java/java-tests/testSrc/com/intellij/codeInsight/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'java/java-tests/testSrc/com/intellij/codeInsight/daemon')
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/AnnotationsHighlightingTest.java5
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImportHelperTest.java2
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/FunctionalTypeWildcardParameterizationTest.java48
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GraphInferenceHighlightingTest.java10
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java8
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java8
6 files changed, 76 insertions, 5 deletions
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/AnnotationsHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/AnnotationsHighlightingTest.java
index 1868d2196d7c..964566fcf5ff 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/AnnotationsHighlightingTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/AnnotationsHighlightingTest.java
@@ -39,6 +39,8 @@ public class AnnotationsHighlightingTest extends LightDaemonAnalyzerTestCase {
public void testInapplicable() { doTest(false); }
public void testDuplicateAttribute() { doTest(false); }
public void testDuplicateTarget() { doTest(false); }
+ public void testPingPongAnnotationTypesDependencies() { doTest(false);}
+ public void testClashMethods() { doTest(false);}
public void testInvalidPackageAnnotationTarget() { doTest(BASE_PATH + "/" + getTestName(true) + "/package-info.java", false, false); }
public void testPackageAnnotationNotInPackageInfo() { doTest(BASE_PATH + "/" + getTestName(true) + "/notPackageInfo.java", false, false); }
@@ -46,9 +48,6 @@ public class AnnotationsHighlightingTest extends LightDaemonAnalyzerTestCase {
public void testTypeAnnotations() { doTest8(false); }
public void testRepeatable() { doTest8(false); }
- public void testPingPongAnnotationTypesDependencies() { doTest(false);}
- public void testClashMethods() { doTest(false);}
-
private void doTest(boolean checkWarnings) {
setLanguageLevel(LanguageLevel.JDK_1_7);
doTest(BASE_PATH + "/" + getTestName(true) + ".java", checkWarnings, false);
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImportHelperTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImportHelperTest.java
index b50052b71750..80448f9d3a96 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImportHelperTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImportHelperTest.java
@@ -368,7 +368,7 @@ public class ImportHelperTest extends DaemonAnalyzerTestCase {
public void testAutoImportOfGenericReference() throws Throwable {
- @NonNls final String text = "class S {{ new ArrayList<caret><> }}";
+ @NonNls final String text = "class S {{ new ArrayList<caret><String> }}";
configureByText(StdFileTypes.JAVA, text);
boolean old = CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY;
CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = true;
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/FunctionalTypeWildcardParameterizationTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/FunctionalTypeWildcardParameterizationTest.java
new file mode 100644
index 000000000000..599ae74cd00d
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/FunctionalTypeWildcardParameterizationTest.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2000-2014 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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;
+
+public class FunctionalTypeWildcardParameterizationTest extends LightDaemonAnalyzerTestCase {
+ @NonNls static final String BASE_PATH = "/codeInsight/daemonCodeAnalyzer/lambda/wildcardParametrization";
+
+ public void testNonWildcardParametrization() throws Exception {
+ doTest();
+ }
+
+ public void testLambdaFormalParamTypesParametrization() throws Exception {
+ doTest();
+ }
+
+ public void testPrimitiveParameterTypes() throws Exception {
+ doTest();
+ }
+
+ private void doTest() {
+ IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), getTestRootDisposable());
+ doTestNewInference(BASE_PATH + "/" + getTestName(false) + ".java", false, false);
+ }
+
+ @Override
+ protected Sdk getProjectJDK() {
+ return IdeaTestUtil.getMockJdk18();
+ }
+}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GraphInferenceHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GraphInferenceHighlightingTest.java
index 1119a0d6d4df..8af0821571d6 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GraphInferenceHighlightingTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GraphInferenceHighlightingTest.java
@@ -28,7 +28,7 @@ public class GraphInferenceHighlightingTest extends LightDaemonAnalyzerTestCase
doTest();
}
- public void _testNestedCallsSameMethod() throws Exception {
+ public void testNestedCallsSameMethod() throws Exception {
doTest();
}
@@ -160,6 +160,14 @@ public class GraphInferenceHighlightingTest extends LightDaemonAnalyzerTestCase
doTest();
}
+ public void testLiftedCaptureToOuterCall() throws Exception {
+ doTest();
+ }
+
+ public void testSiteSubstitutionForReturnConstraint() throws Exception {
+ doTest();
+ }
+
private void doTest() throws Exception {
doTest(false);
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java
index 89ddef20df0e..826193c90f90 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java
@@ -138,6 +138,14 @@ public class NewLambdaHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest();
}
+ public void testDiamondInLambdaReturn() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA118965() throws Exception {
+ doTest();
+ }
+
private void doTest() {
doTest(false);
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java
index e944269c098b..83f0dfac5c1e 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java
@@ -173,6 +173,14 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest();
}
+ public void testReturnTypeCheckForRawReceiver() throws Exception {
+ doTest();
+ }
+
+ public void testStaticNonStaticReferenceTypeAmbiguity() throws Exception {
+ doTest();
+ }
+
private void doTest() {
doTest(false);
}