Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayaprakash Arthanareeswaran2014-08-20 05:06:37 +0000
committerJayaprakash Arthanareeswaran2014-08-20 05:06:37 +0000
commit97ab3cc22cd29aa2a71224814e66535bc04ff083 (patch)
tree84b693536274dd74c5dbd6d1a7914a926dede143 /org.eclipse.jdt.core.tests.builder
parent90b810df265e79befa5cf6aa97ec5bb891d50b26 (diff)
downloadeclipse.jdt.core-97ab3cc22cd29aa2a71224814e66535bc04ff083.tar.gz
eclipse.jdt.core-97ab3cc22cd29aa2a71224814e66535bc04ff083.tar.xz
eclipse.jdt.core-97ab3cc22cd29aa2a71224814e66535bc04ff083.zip
Fixed bug 422884 - [test] Failure in BasicBuildTests.testbBug386901:
Incorrect value expected:<0> but was:<2000> Change-Id: Ie73778062c8ae28c529a98590c03f5aef50a3782 Signed-off-by: Jayaprakash Arthanareeswaran <jarthana@in.ibm.com>
Diffstat (limited to 'org.eclipse.jdt.core.tests.builder')
-rw-r--r--org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BasicBuildTests.java52
1 files changed, 28 insertions, 24 deletions
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 6cffbf483b..737d6e9b66 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,36 +573,40 @@ public class BasicBuildTests extends BuilderTests {
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=386901
public void testbBug386901() throws JavaModelException {
- IPath projectPath = env.addProject("Project"); //$NON-NLS-1$
- env.addExternalJars(projectPath, Util.getJavaClassLibs());
+
+ int previous = org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.MAX_AT_ONCE;
+ try {
+ IPath projectPath = env.addProject("Project"); //$NON-NLS-1$
+ env.addExternalJars(projectPath, Util.getJavaClassLibs());
- // remove old package fragment root so that names don't collide
- env.removePackageFragmentRoot(projectPath, ""); //$NON-NLS-1$
+ // remove old package fragment root so that names don't collide
+ env.removePackageFragmentRoot(projectPath, ""); //$NON-NLS-1$
- IPath root = env.addPackageFragmentRoot(projectPath, "src"); //$NON-NLS-1$
- env.setOutputFolder(projectPath, "bin"); //$NON-NLS-1$
+ 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$
- "package p; \n"+ //$NON-NLS-1$
- "public class AA {} \n"+ //$NON-NLS-1$
- "class AZ {}"); //$NON-NLS-1$
+ env.addClass(root, "p", "AA", //$NON-NLS-1$ //$NON-NLS-2$
+ "package p; \n"+ //$NON-NLS-1$
+ "public class AA {} \n"+ //$NON-NLS-1$
+ "class AZ {}"); //$NON-NLS-1$
- IPath pathToAB = env.addClass(root, "p", "AB", //$NON-NLS-1$ //$NON-NLS-2$
- "package p; \n"+ //$NON-NLS-1$
- "public class AB extends AZ {}"); //$NON-NLS-1$
+ IPath pathToAB = env.addClass(root, "p", "AB", //$NON-NLS-1$ //$NON-NLS-2$
+ "package p; \n"+ //$NON-NLS-1$
+ "public class AB extends AZ {}"); //$NON-NLS-1$
- int previous = org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.MAX_AT_ONCE;
- 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>]"
- );
+ 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>]"
+ );
- org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.MAX_AT_ONCE = 0; // All units compiled at once
- fullBuild(projectPath);
- expectingNoProblems();
- assertEquals("Incorrect value", 0, previous);
+ org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.MAX_AT_ONCE = 0; // All units compiled at once
+ fullBuild(projectPath);
+ expectingNoProblems();
+ } finally {
+ org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.MAX_AT_ONCE = previous;
+ }
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=425420
public void testBug425420() throws JavaModelException {

Back to the top