You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by sj...@apache.org on 2009/02/26 12:33:49 UTC

svn commit: r748098 - /harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java

Author: sjanuary
Date: Thu Feb 26 11:33:49 2009
New Revision: 748098

URL: http://svn.apache.org/viewvc?rev=748098&view=rev
Log:
Pack200 - update segment limit test

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java?rev=748098&r1=748097&r2=748098&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java Thu Feb 26 11:33:49 2009
@@ -145,28 +145,13 @@
     }
 
     public void testSegmentLimits() throws IOException, Pack200Exception {
-        in = new JarInputStream(
-                Archive.class
-                        .getResourceAsStream("/org/apache/harmony/pack200/tests/hw.jar"));
-        file = File.createTempFile("helloworld", ".pack.gz");
-        out = new FileOutputStream(file);
-        Archive archive = new Archive(in, out, true);
-        archive.setSegmentLimit(1);
-        try {
-            archive.pack();
-            fail("Should throw an execption with a 1-byte segment limit");
-        } catch (Pack200Exception pe) {
-            assertEquals("Expected limit too small message", "Segment limit is too small for the files you are trying to pack", pe.getMessage());
-        }
-        in.close();
-        out.close();
 
         in = new JarInputStream(
                 Archive.class
                         .getResourceAsStream("/org/apache/harmony/pack200/tests/hw.jar"));
         file = File.createTempFile("helloworld", ".pack.gz");
         out = new FileOutputStream(file);
-        archive = new Archive(in, out, true);
+        Archive archive = new Archive(in, out, true);
         archive.setSegmentLimit(0);
         archive.pack();
         in.close();