multiple jdks test of correct check of inheritance when super type has unknown type in type argument list

This commit is contained in:
Anna Kozlova
2015-01-22 18:40:45 +01:00
parent cfea16328e
commit e81c0c2c32
5 changed files with 41 additions and 9 deletions

View File

@@ -0,0 +1,2 @@
package p;
<error descr="Cannot access java.util.stream.Stream">abstract class B extends A</error>{}

View File

@@ -0,0 +1,8 @@
package p;
abstract class B extends A {
{
<error descr="Cannot resolve method 'filter(null)'">filter</error>(null);
}
}
<error descr="Cannot access java.util.stream.Stream">abstract class C extends A</error>{}

View File

@@ -0,0 +1,6 @@
package p;
import java.util.stream.Stream;
import java.util.List;
public abstract class A implements List<Stream<String>> {
}

View File

@@ -0,0 +1,5 @@
package p;
import java.util.stream.Stream;
public abstract class A implements Stream<String> {
}

View File

@@ -105,24 +105,35 @@ public class MultipleJdksHighlightingTest extends UsefulTestCase {
@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();
doTestWithoutLibrary();
}
@Bombed(month = Calendar.FEBRUARY, day = 20)
public void testGenericComparator() throws Exception {
doTestWithoutLibrary();
}
@Bombed(month = Calendar.FEBRUARY, day = 20)
public void testGenericCallableWithDifferentTypeArgs() throws Exception {
doTestWithoutLibrary();
}
@Bombed(month = Calendar.FEBRUARY, day = 20)
public void testSuperclassImplementsUnknownType() throws Exception {
doTestWithoutLibrary();
}
@Bombed(month = Calendar.FEBRUARY, day = 20)
public void testSuperclassImplementsGenericsOfUnknownType() throws Exception {
doTestWithoutLibrary();
}
private void doTestWithoutLibrary() {
final String name = getTestName(false);
myFixture.configureByFiles("java7/p/" + name + ".java", "java8/p/" + name + ".java");
myFixture.checkHighlighting();
}
@Bombed(month = Calendar.FEBRUARY, day = 20)
public void testGenericCallableWithDifferentTypeArgs() 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);