Bug 463153: [test][builder] test failures in BasicBuildTests and BuildPathTests
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BasicBuildTests.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BasicBuildTests.java
index 2adca6e..6820f35 100644
--- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BasicBuildTests.java
+++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BasicBuildTests.java
@@ -573,7 +573,7 @@
}
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=386901
- public void _testbBug386901() throws JavaModelException {
+ public void testbBug386901() throws JavaModelException {
int previous = org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.MAX_AT_ONCE;
try {
@@ -586,20 +586,20 @@
IPath root = env.addPackageFragmentRoot(projectPath, "src"); //$NON-NLS-1$
env.setOutputFolder(projectPath, "bin"); //$NON-NLS-1$
- env.addClass(root, "p", "AA", //$NON-NLS-1$ //$NON-NLS-2$
+ env.addClass(root, "p", "AB", //$NON-NLS-1$ //$NON-NLS-2$
"package p; \n"+ //$NON-NLS-1$
- "public class AA {} \n"+ //$NON-NLS-1$
+ "public class AB {} \n"+ //$NON-NLS-1$
"class AZ {}"); //$NON-NLS-1$
- IPath pathToAB = env.addClass(root, "p", "AB", //$NON-NLS-1$ //$NON-NLS-2$
+ IPath pathToAA = env.addClass(root, "p", "AA", //$NON-NLS-1$ //$NON-NLS-2$
"package p; \n"+ //$NON-NLS-1$
- "public class AB extends AZ {}"); //$NON-NLS-1$
+ "public class AA extends AZ {}"); //$NON-NLS-1$
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.MAX_AT_ONCE = 1; // units compiled in batches of '1' unit
fullBuild(projectPath);
expectingProblemsFor(
- pathToAB,
- "Problem : AZ cannot be resolved to a type [ resource : </Project/src/p/AB.java> range : <36,38> category : <40> severity : <2>]"
+ pathToAA,
+ "Problem : AZ cannot be resolved to a type [ resource : </Project/src/p/AA.java> range : <36,38> category : <40> severity : <2>]"
);
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.MAX_AT_ONCE = 0; // All units compiled at once
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BuildpathTests.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BuildpathTests.java
index e63f982..ae10ec6 100644
--- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BuildpathTests.java
+++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BuildpathTests.java
@@ -639,21 +639,21 @@
env.removeProject(projectPath);
}
-public void _testMissingLibrary2() throws JavaModelException {
+public void testMissingLibrary2() throws JavaModelException {
IPath projectPath = env.addProject("Project"); //$NON-NLS-1$
env.removePackageFragmentRoot(projectPath, ""); //$NON-NLS-1$
IPath root = env.addPackageFragmentRoot(projectPath, "src"); //$NON-NLS-1$
IPath bin = env.setOutputFolder(projectPath, "bin"); //$NON-NLS-1$
- IPath classTest1 = env.addClass(root, "p1", "Test1", //$NON-NLS-1$ //$NON-NLS-2$
- "package p1;\n"+ //$NON-NLS-1$
+ IPath classTest1 = env.addClass(root, "p2", "Test1", //$NON-NLS-1$ //$NON-NLS-2$
+ "package p2;\n"+ //$NON-NLS-1$
"public class Test1 {}" //$NON-NLS-1$
);
IPath classTest2 = env.addClass(root, "p2", "Test2", //$NON-NLS-1$ //$NON-NLS-2$
"package p2;\n"+ //$NON-NLS-1$
"public class Test2 {}" //$NON-NLS-1$
);
- IPath classTest3 = env.addClass(root, "p2", "Test3", //$NON-NLS-1$ //$NON-NLS-2$
- "package p2;\n"+ //$NON-NLS-1$
+ IPath classTest3 = env.addClass(root, "p3", "Test3", //$NON-NLS-1$ //$NON-NLS-2$
+ "package p3;\n"+ //$NON-NLS-1$
"public class Test3 {}" //$NON-NLS-1$
);
@@ -667,11 +667,11 @@
Problem[] prob3 = env.getProblemsFor(classTest3);
assertEquals("too many problems", prob1.length + prob2.length + prob3.length, 1); //$NON-NLS-1$
if(prob1.length == 1) {
- expectingSpecificProblemFor(classTest1, new Problem("p1", "The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files", classTest1, -1, -1, -1, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
+ expectingSpecificProblemFor(classTest1, new Problem("p2", "The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files", classTest1, 0, 1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
} else if (prob2.length == 1) {
expectingSpecificProblemFor(classTest2, new Problem("p2", "The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files", classTest2, -1, -1, -1, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
} else {
- expectingSpecificProblemFor(classTest3, new Problem("p2", "The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files", classTest3, 0, 1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
+ expectingSpecificProblemFor(classTest3, new Problem("p3", "The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files", classTest3, -1, -1, -1, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
}
//----------------------------
@@ -682,9 +682,9 @@
incrementalBuild();
expectingNoProblems();
expectingPresenceOf(new IPath[]{
- bin.append("p1").append("Test1.class"), //$NON-NLS-1$ //$NON-NLS-2$
+ bin.append("p2").append("Test1.class"), //$NON-NLS-1$ //$NON-NLS-2$
bin.append("p2").append("Test2.class"), //$NON-NLS-1$ //$NON-NLS-2$
- bin.append("p2").append("Test3.class") //$NON-NLS-1$ //$NON-NLS-2$
+ bin.append("p3").append("Test3.class") //$NON-NLS-1$ //$NON-NLS-2$
});
env.removeProject(projectPath);
}