multiple jdks: wrong resolve order tests bombed
authorAnna Kozlova <anna.kozlova@jetbrains.com>
Wed, 21 Jan 2015 11:35:50 +0000 (12:35 +0100)
committerAnna Kozlova <anna.kozlova@jetbrains.com>
Wed, 21 Jan 2015 11:45:55 +0000 (12:45 +0100)
java/java-tests/testData/codeInsight/multipleJdks/java7/p/WrongComparator.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/multipleJdks/java8/p/WrongComparator.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/multipleJdks/java8/p/WrongSuperInLibrary.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/multipleJdks/libs/WrongSuperInLibrary.jar [new file with mode: 0644]
java/java-tests/testSrc/com/intellij/codeInsight/MultipleJdksHighlightingTest.java

diff --git a/java/java-tests/testData/codeInsight/multipleJdks/java7/p/WrongComparator.java b/java/java-tests/testData/codeInsight/multipleJdks/java7/p/WrongComparator.java
new file mode 100644 (file)
index 0000000..3eeb7d8
--- /dev/null
@@ -0,0 +1,6 @@
+package p;
+abstract class B extends A implements java.util.Comparator {
+  {
+    <error descr="Cannot resolve method 'reversed()'">reversed</error>();
+  }
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/multipleJdks/java8/p/WrongComparator.java b/java/java-tests/testData/codeInsight/multipleJdks/java8/p/WrongComparator.java
new file mode 100644 (file)
index 0000000..83e3e92
--- /dev/null
@@ -0,0 +1,3 @@
+package p;
+public abstract class A implements java.util.Comparator {
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/multipleJdks/java8/p/WrongSuperInLibrary.java b/java/java-tests/testData/codeInsight/multipleJdks/java8/p/WrongSuperInLibrary.java
new file mode 100644 (file)
index 0000000..cc96792
--- /dev/null
@@ -0,0 +1,6 @@
+package p;
+public abstract class A {
+  void foo(L l) {
+    l.stream();
+  }
+}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/multipleJdks/libs/WrongSuperInLibrary.jar b/java/java-tests/testData/codeInsight/multipleJdks/libs/WrongSuperInLibrary.jar
new file mode 100644 (file)
index 0000000..db88721
Binary files /dev/null and b/java/java-tests/testData/codeInsight/multipleJdks/libs/WrongSuperInLibrary.jar differ
index 9d3ec5986cd9480bd5c0f34b984b7b287779fdfa..f7b1cb2235d78c02a819bcdbeaaf64c579255dfc 100644 (file)
@@ -16,6 +16,7 @@
 
 package com.intellij.codeInsight;
 
+import com.intellij.idea.Bombed;
 import com.intellij.openapi.application.ex.PathManagerEx;
 import com.intellij.openapi.module.Module;
 import com.intellij.openapi.roots.ModifiableRootModel;
@@ -28,6 +29,8 @@ import com.intellij.testFramework.builders.JavaModuleFixtureBuilder;
 import com.intellij.testFramework.fixtures.*;
 import com.intellij.util.Consumer;
 
+import java.util.Calendar;
+
 public class MultipleJdksHighlightingTest extends UsefulTestCase {
 
   private CodeInsightTestFixture myFixture;
@@ -84,7 +87,30 @@ public class MultipleJdksHighlightingTest extends UsefulTestCase {
     doTest();
   }
 
-  protected void doTest() {
+  @Bombed(month = Calendar.FEBRUARY, day = 20)
+  public void testWrongSuperInLibrary() throws Exception {
+    final String name = getTestName(false);
+    for (Module module : new Module[] {myJava7Module, myJava8Module}) {
+      ModuleRootModificationUtil.updateModel(module, new Consumer<ModifiableRootModel>() {
+        @Override
+        public void consume(ModifiableRootModel model) {
+          ClsGenericsHighlightingTest.commitLibraryModel(model, myFixture.getTestDataPath(), name + ".jar");
+        }
+      });
+    }
+
+    myFixture.configureByFile("java8/p/" + name + ".java");
+    myFixture.checkHighlighting();
+  }
+  
+  @Bombed(month = Calendar.FEBRUARY, day = 20)
+  public void testWrongComparator() throws Exception {
+    final String name = getTestName(false);
+    myFixture.configureByFiles("java7/p/" + name + ".java", "java8/p/" + name + ".java");
+    myFixture.checkHighlighting();
+  }
+
+  private void doTest() {
     final String name = getTestName(false);
     for (Module module : new Module[] {myJava7Module, myJava8Module}) {
       ModuleRootModificationUtil.updateModel(module, new Consumer<ModifiableRootModel>() {