Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsliebig2008-04-15 08:15:08 -0400
committersliebig2008-04-15 08:15:08 -0400
commite0fa70dfe0cb05935b3d076d78a07b716fccc9d1 (patch)
tree11de780b8d15bb276f82159219e6484b0024a167 /bundles/org.eclipse.equinox.p2.tests.optimizers
parent73b09e4b1b8233cc9d37939b38eab93e6984d89f (diff)
downloadrt.equinox.p2-e0fa70dfe0cb05935b3d076d78a07b716fccc9d1.tar.gz
rt.equinox.p2-e0fa70dfe0cb05935b3d076d78a07b716fccc9d1.tar.xz
rt.equinox.p2-e0fa70dfe0cb05935b3d076d78a07b716fccc9d1.zip
added additional assert
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests.optimizers')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java
index f61c78883..2401e14c3 100644
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java
@@ -55,19 +55,18 @@ public class Pack200OptimizerTest extends TestCase {
InputStream inputStream = bundle.getEntry("testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar").openStream();
FileUtils.copyStream(inputStream, true, step, true);
+ assertTrue("Failure: " + step.getStatus().getMessage(), step.getStatus().isOK());
+
// Get the test data. The Sun 1.6.0_01 JRE produces a different packed file
// then the IBM V5 JRE, so both versions of the test data are maintained.
// TODO: investigate this? Is the difference spurious? Are there differences
// in the pack200 results for other JREs? Do we need a more general
// solution to the problem?
String javaVersion = System.getProperty("java.version");
- boolean is1_6 = (javaVersion.compareTo("1.6") > 0 ? true : false);
+ boolean is1_6 = javaVersion.compareTo("1.6") > 0;
+
+ inputStream = bundle.getEntry(is1_6 ? "testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz" : "testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz").openStream();
- if (!is1_6) {
- inputStream = bundle.getEntry("testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz").openStream();
- } else {
- inputStream = bundle.getEntry("testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz").openStream();
- }
ByteArrayOutputStream expected = new ByteArrayOutputStream();
FileUtils.copyStream(inputStream, true, expected, true);

Back to the top