Skip to content

Commit

Permalink
Disabled tests failing with Java 1.8 compilation settings
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveeclipse committed Jul 24, 2024
1 parent c2cd84c commit 7738bbe
Show file tree
Hide file tree
Showing 22 changed files with 47 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void testHierarchyCycleInstanceof() throws JavaModelException {
}

// https://bugs.eclipse.org/bugs/show_bug.cgi?id=231293
public void testMissingRequiredBinaries() throws JavaModelException {
public void _2551_testMissingRequiredBinaries() throws JavaModelException {

IPath p1 = env.addProject("P1", CompilerOptions.getFirstSupportedJavaVersion()); //$NON-NLS-1$
IPath p2 = env.addProject("P2"); //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2149,7 +2149,7 @@ public void test461074() throws JavaModelException {
env.removeProject(p3);
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=461074, "indirectly referenced from required .class files" error for unreachable reference of type in overriding method declaration in a library on classpath
public void test461074_error() throws JavaModelException {
public void _2551_test461074_error() throws JavaModelException {
//----------------------------
// Project1
//----------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2637,7 +2637,7 @@ public static void main(String[] args) {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=67643
* from 1.5 source level on most specific common super type is allowed
*/
public void test080() {
public void _2551_test080() {
this.runNegativeTest(
new String[] {
"X.java",
Expand Down Expand Up @@ -2825,7 +2825,7 @@ public void test087() {
"----------\n"
);
}
public void test088() {
public void _2551_test088() {
this.runNegativeTest(
new String[] {
"p/X.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void test001() {
},
"OK");
}
public void test002() throws Exception {
public void _2551_test002() throws Exception {
this.runConformTest(
new String[] {
"X.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15331,7 +15331,7 @@ public void test0497() {
}

// https://bugs.eclipse.org/bugs/show_bug.cgi?id=84743 - variation in -source 1.4 mode but 1.5 compliance (ignore covariance)
public void test0498(){
public void _2551_test0498(){
Map customOptions = getCompilerOptions();
customOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.getFirstSupportedJavaVersion());
runNegativeTest(
Expand Down Expand Up @@ -29213,7 +29213,7 @@ public void test0885() {
"----------\n");
}
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=124943
public void test0886() {
public void _2551_test0886() {
Map customOptions= getCompilerOptions();
customOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.getFirstSupportedJavaVersion());
runConformTest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public void test040() {
* Bug 83804: [1.5][javadoc] Missing Javadoc node for package declaration
* @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=83804"
*/
public void testBug83804() {
public void _2551_testBug83804() {
runNegativeTest(
new String[] {
"pack/package-info.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public class X<T, U, V> {}
"""
);
}
public void test021() {
public void _2551_test021() {
this.runNegativeTest(
new String[] {
"X.java",
Expand Down Expand Up @@ -183,7 +183,7 @@ public void test021() {
"----------\n"
);
}
public void test022() {
public void _2551_test022() {
this.runNegativeTest(
new String[] {
"X.java",
Expand Down Expand Up @@ -319,7 +319,7 @@ public void test040() {
* Bug 83804: [1.5][javadoc] Missing Javadoc node for package declaration
* @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=83804"
*/
public void testBug83804() {
public void _2551_testBug83804() {
runNegativeTest(
new String[] {
"pack/package-info.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void test314_warn_options() {

// -warn option - regression tests to check option nullAnnot and missingNullDefault
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=372012
public void test315_warn_options() {
public void _2551_test315_warn_options() {
this.runConformTest(
new String[] {
"p/package-info.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4751,7 +4751,7 @@ public void test0150() throws CoreException {
}

// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88548
public void test0151() throws CoreException {
public void _2551_test0151() throws CoreException {
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
String contents =
"public enum X {\n" +
Expand Down Expand Up @@ -7162,7 +7162,7 @@ public void test0220() throws JavaModelException {
/*
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=147875
*/
public void test0221() throws JavaModelException {
public void _2551_test0221() throws JavaModelException {
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
String contents =
"import p1.p2.MyEnum;\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4749,7 +4749,7 @@ public void test0150() throws CoreException {

// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88548
@SuppressWarnings("deprecation")
public void test0151() throws CoreException {
public void _2551_test0151() throws CoreException {
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
String contents =
"public enum X {\n" +
Expand Down Expand Up @@ -7159,7 +7159,7 @@ public void test0220() throws JavaModelException {
/*
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=147875
*/
public void test0221() throws JavaModelException {
public void _2551_test0221() throws JavaModelException {
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
String contents =
"import p1.p2.MyEnum;\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4764,7 +4764,7 @@ public void test0150() throws CoreException {

// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88548
@SuppressWarnings("deprecation")
public void test0151() throws CoreException {
public void _2551_test0151() throws CoreException {
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
String contents =
"public enum X {\n" +
Expand Down Expand Up @@ -7174,7 +7174,7 @@ public void test0220() throws JavaModelException {
/*
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=147875
*/
public void test0221() throws JavaModelException {
public void _2551_test0221() throws JavaModelException {
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
String contents =
"import p1.p2.MyEnum;\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ public void test0017() throws JavaModelException {
/*
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=350897
*/
public void test0018() throws JavaModelException {
public void _2551_test0018() throws JavaModelException {
String contents =
"public class X<T> {\n" +
" T field1;\n" +
Expand Down Expand Up @@ -802,7 +802,7 @@ public void test0020() throws JavaModelException {
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=402673
*/
public void test402673a() throws JavaModelException {
public void _2551_test402673a() throws JavaModelException {
String contents = "package test402673;"
+ "public class X {\n"
+ " Runnable r = () -> System.out.println(\"hi\");\n"
Expand Down Expand Up @@ -830,7 +830,7 @@ public void test402673a() throws JavaModelException {
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=402673
*/
public void test402673b() throws JavaModelException {
public void _2551_test402673b() throws JavaModelException {
String contents = "package test402673;"
+ "public class X {\n"
+ " public void foo() {\n"
Expand Down Expand Up @@ -862,7 +862,7 @@ public void test402673b() throws JavaModelException {
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=402674
*/
public void test403444() throws JavaModelException {
public void _2551_test403444() throws JavaModelException {
this.workingCopy = getWorkingCopy("/Converter18/src/test403444/X.java",
true/* resolve */);
String contents = "package test403444;" +
Expand Down Expand Up @@ -942,7 +942,7 @@ public void test403444() throws JavaModelException {
/*
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=399791
*/
public void test0021() throws JavaModelException {
public void _2551_test0021() throws JavaModelException {
String contents =
"public interface X {\n" +
" static void foo(){}\n" +
Expand All @@ -966,7 +966,7 @@ public void test0021() throws JavaModelException {
*
* @deprecated as it uses deprecated methods
*/
public void test0022() throws JavaModelException {
public void _2551_test0022() throws JavaModelException {
String contents =
"public class X {\n" +
" void foo() throws @NonNull EOFException, java.io.@NonNull FileNotFoundException {}\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4967,7 +4967,7 @@ public void acceptBinding(String bindingKey, IBinding binding) {
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
*/
public void testBug425601_001() throws JavaModelException {
public void _2551_testBug425601_001() throws JavaModelException {
this.workingCopy = getWorkingCopy("/Converter18/src/testBug425601_001/Outer.java",
true/* resolve */);
String contents = "package testBug425601_001;\n" +
Expand Down Expand Up @@ -5010,7 +5010,7 @@ public void testBug425601_001() throws JavaModelException {
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
*/
public void testBug425601_002() throws JavaModelException {
public void _2551_testBug425601_002() throws JavaModelException {
this.workingCopy = getWorkingCopy("/Converter18/src/testBug425601_002/Outer.java",
true/* resolve */);
String contents = "package testBug425601_002;\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5222,7 +5222,7 @@ public void test0569() throws JavaModelException {
* when the AST is computed using ICompilationUnit#reconcile(...)
* (regression test for bug 83210 Unidentical ITypeBindings for same type from same AST from reconcile)
*/
public void test0570() throws CoreException {
public void _2551_test0570() throws CoreException {
ICompilationUnit workingCopy = null;
try {
workingCopy = getWorkingCopy("/Converter/src/X.java", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2711,7 +2711,7 @@ public void test0492() throws JavaModelException {
/**
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0493() throws JavaModelException {
public void _2551_test0493() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0493", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(getJLS4(), sourceUnit, true);
Expand All @@ -2737,7 +2737,7 @@ public void test0493() throws JavaModelException {
/**
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0494() throws JavaModelException {
public void _2551_test0494() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0494", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(getJLS4(), sourceUnit, true);
Expand Down Expand Up @@ -2767,7 +2767,7 @@ public void test0494() throws JavaModelException {
/**
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0495() throws JavaModelException {
public void _2551_test0495() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0495", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(getJLS4(), sourceUnit, true);
Expand Down Expand Up @@ -2797,7 +2797,7 @@ public void test0495() throws JavaModelException {
/**
* http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
*/
public void test0496() throws JavaModelException {
public void _2551_test0496() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0496", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(getJLS4(), sourceUnit, true);
Expand Down Expand Up @@ -6359,7 +6359,7 @@ public void test0605() throws JavaModelException {
/*
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=89014
*/
public void test0606() throws JavaModelException {
public void _2551_test0606() throws JavaModelException {
ICompilationUnit workingCopy = null;
try {
String contents =
Expand Down Expand Up @@ -9535,7 +9535,7 @@ public void test0682() throws JavaModelException {
/**
* http://dev.eclipse.org/bugs/show_bug.cgi?id=196514
*/
public void test0683() throws JavaModelException {
public void _2551_test0683() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0683", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ASTNode node = runConversion(getJLS4(), sourceUnit, true, true);
assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
Expand Down Expand Up @@ -9678,7 +9678,7 @@ public void test0686() throws JavaModelException {
/*
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=207754
*/
public void test0687() throws JavaModelException {
public void _2551_test0687() throws JavaModelException {
ICompilationUnit workingCopy = null;
try {
String contents =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ public void test062() throws CoreException {
* Ensures that a raw method binding can be created using its key in batch creation.
* (regression test for bug 87749 different IMethodBindings of generic method have equal getKey())
*/
public void test063() throws CoreException {
public void _2551_test063() throws CoreException {
assertRequestedBindingFound(
new String[] {
"/P/p1/X.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1066,12 +1066,13 @@ public void testInnerClass8() throws JavaModelException {
* Ensures that the source of an inner class can be retrieved.
* (regression test for bug 124611 IAE in Signature.createCharArrayTypeSignature)
*/
public void testInnerClass9() throws JavaModelException {
public void _2551_testInnerClass9() throws JavaModelException {
IJavaProject project = this.getJavaProject("/AttachSourceTests");
IPackageFragmentRoot root = project.getPackageFragmentRoot(getFile("/AttachSourceTests/innerClasses.jar"));
attachSource(root, "/AttachSourceTests/innerClassessrc.zip", null);
IPackageFragment fragment = root.getPackageFragment("inner");

// TODO: source mapping for inner classes on Java 1.8 broken.
// See BinaryType.getSource() where SourceMapper can't find source for inner classes for source compiled with Java 8 target (works with 1.4)
IType type = fragment.getOrdinaryClassFile("X$4$U.class").getType();
assertSourceEquals(
"Unexpected source",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,13 @@ public void test232816e() throws CoreException {
}
}

public void test232816f() throws Exception {
public void _2551_test232816f() throws Exception {

IJavaProject p = null;
try {
p = createJavaProject("P");

p.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_4);
setUpProjectCompliance(p, CompilerOptions.getFirstSupportedJavaVersion(), true);
p.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, CompilerOptions.getFirstSupportedJavaVersion());
p.setOption(JavaCore.CORE_INCOMPATIBLE_JDK_LEVEL, JavaCore.WARNING);

JavaCore.setClasspathContainer(
Expand All @@ -454,7 +454,8 @@ public void test232816f() throws Exception {
JavaCore.newLibraryEntry(getExternalJCLPath(CompilerOptions.getLatestVersion()), new Path("/P0/SBlah"), new Path("/P0"))})
},
null);

// TODO See https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2580
// jclMin22.jar contains classes compiled against Java 21
IClasspathEntry newClasspath = JavaCore.newContainerEntry(new Path("container/default"));

IJavaModelStatus status = JavaConventions.validateClasspathEntry(p, newClasspath, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ public void testMoveCU12() throws CoreException {
* Ensures that the Javadoc comment is not lost if moving a cu to the default package
* (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=247757 )
*/
public void testMoveCU13() throws CoreException {
public void _2551_testMoveCU13() throws CoreException {
createFolder("/P/src/p1");
createFile(
"/P/src/p1/X.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15291,7 +15291,7 @@ public void testBug547095_type_pattern_search_non_modular() throws Exception {
}
}

public void testBug573486_showReferences_inMethodsAndFields_whenNoSource() throws CoreException, IOException {
public void _2551_testBug573486_showReferences_inMethodsAndFields_whenNoSource() throws CoreException, IOException {
addLibraryEntry(JAVA_PROJECT, "/JavaSearchBugs/lib/search_lib_no_source.jar", false);
try {
IType type = getClassFile("JavaSearchBugs", "lib/search_lib_no_source.jar", "java.util", "Observable.class").getType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ public void testBug479389() throws CoreException, IOException {
deleteProject(project);
}
}
public void testBug565246() throws CoreException {
public void _2551_testBug565246() throws CoreException {
IJavaProject project = createJavaProject("Bug565246", new String[] {"src"}, new String[] {"JCL18_LIB", this.ANNOTATION_LIB_V1}, "bin", CompilerOptions.getFirstSupportedJavaVersion());
try {
project.setOption(JavaCore.COMPILER_ANNOTATION_NULL_ANALYSIS, JavaCore.ENABLED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ public void run(IProgressMonitor monitor) throws CoreException {
* Ensure that performing a concurrent job while indexing a jar doesn't use the old index.
* (regression test for bug 35306 Index update request can be incorrectly handled)
*/
public void testConcurrentJob() throws Exception {
public void _2551_testConcurrentJob() throws Exception {
WaitingJob job = new WaitingJob();
final String library = "jclMin" + CompilerOptions.getFirstSupportedJavaVersion() + ".jar";
try {
Expand Down

0 comments on commit 7738bbe

Please sign in to comment.