commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r669110 - in /commons/sandbox/compress/trunk/src/test/org/apache/commons/compress: archivers/tar/ archivers/zip/ compressors/bzip2/
Date Wed, 18 Jun 2008 08:35:41 GMT
Author: ebourg
Date: Wed Jun 18 01:35:39 2008
New Revision: 669110

URL: http://svn.apache.org/viewvc?rev=669110&view=rev
Log:
Removed the suite classes and the constructors from the test cases

Removed:
    commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/tar/TarTestSuite.java
Modified:
    commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/tar/TarTestCase.java
    commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/AsiExtraFieldTestCase.java
    commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ExtraFieldUtilsTestCase.java
    commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipEntryTestCase.java
    commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipLongTestCase.java
    commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipShortTestCase.java
    commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/compressors/bzip2/BzipTestCase.java

Modified: commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/tar/TarTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/tar/TarTestCase.java?rev=669110&r1=669109&r2=669110&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/tar/TarTestCase.java
(original)
+++ commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/tar/TarTestCase.java
Wed Jun 18 01:35:39 2008
@@ -29,9 +29,6 @@
 
 import junit.framework.TestCase;
 
-import org.apache.commons.compress.archivers.tar.TarEntry;
-import org.apache.commons.compress.archivers.tar.TarInputStream;
-
 /**
  * Test case for all tar resources.
  *
@@ -39,8 +36,7 @@
  * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  * @version $Revision: 155439 $ $Date$
  */
-public final class TarTestCase
-    extends TestCase
+public final class TarTestCase extends TestCase
 {
     private static final char SP = File.separatorChar;
     private static final String BASE_DATA_NAME = "data.txt";
@@ -51,14 +47,11 @@
     private static final String BASEDIR = calcBaseDir();
 
     private static final File BASEDIR_FILE = new File( BASEDIR );
-    private static final File POSIX_TAR_FILE =
-        new File( BASEDIR_FILE, "posix.tar" );
+    private static final File POSIX_TAR_FILE = new File( BASEDIR_FILE, "posix.tar" );
     //    private static final File V7_TAR_FILE =
     //        new File( BASEDIR_FILE, "v7.tar" );
-    private static final File GNU_TAR_FILE =
-        new File( BASEDIR_FILE, "gnu.tar" );
-    private static final File DATA_FILE1 =
-        new File( BASEDIR_FILE, BASE_DATA_NAME );
+    private static final File GNU_TAR_FILE = new File( BASEDIR_FILE, "gnu.tar" );
+    private static final File DATA_FILE1 = new File( BASEDIR_FILE, BASE_DATA_NAME );
     private static final String USER_NAME = "avalon";
     private static final String GROUP_NAME = "excalibur";
     private static final long SIZE = DATA_FILE1.length();
@@ -67,40 +60,25 @@
     private static final int MODE = 0100000;
     private static final int MOD_TIME = 0;
 
-    public TarTestCase()
-    {
-        this( "Tar Test Case" );
-    }
-
-    public TarTestCase( String name )
-    {
-        super( name );
-    }
-
     private static String calcBaseDir()
     {
         final String name = TarTestCase.class.getName();
         final int size = name.length();
-        final String filename =
-            name.substring( 0, size - 11 ).replace( '.', SP );
-        return "src" + SP + "test" + SP +
-                SP + filename + SP;
+        final String filename = name.substring( 0, size - 11 ).replace( '.', SP );
+        return "src" + SP + "test" + SP + SP + filename + SP;
     }
 
-    public void testReadPosixTar()
-        throws Exception
+    public void testReadPosixTar() throws Exception
     {
         compareTar( BASE_DATA_NAME, POSIX_TAR_FILE );
     }
 
-    public void testReadGnuTar()
-        throws Exception
+    public void testReadGnuTar() throws Exception
     {
         compareTar( LONG_FILE_NAME, GNU_TAR_FILE );
     }
 
-    public void testWritePosixTar()
-        throws Exception
+    public void testWritePosixTar() throws Exception
     {
         //final File temp = new File( BASEDIR_FILE, "posix2.tar" );
         final File temp = File.createTempFile( "delete-me", "tar" );
@@ -122,8 +100,7 @@
         temp.delete();
     }
 
-    public void testWriteGnuTar()
-        throws Exception
+    public void testWriteGnuTar() throws Exception
     {
         //final File temp = new File( BASEDIR_FILE, "gnu2.tar" );
         final File temp = File.createTempFile( "delete-me", "tar" );
@@ -178,8 +155,7 @@
      * @param file1 the tar file comparing
      * @throws IOException if an error occurs
      */
-    private void compareTar( final String entryName,
-                             final File file1 )
+    private void compareTar( final String entryName, final File file1 )
         throws IOException
     {
         final FileInputStream fileInput = new FileInputStream( file1 );

Modified: commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/AsiExtraFieldTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/AsiExtraFieldTestCase.java?rev=669110&r1=669109&r2=669110&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/AsiExtraFieldTestCase.java
(original)
+++ commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/AsiExtraFieldTestCase.java
Wed Jun 18 01:35:39 2008
@@ -21,9 +21,6 @@
 
 import java.util.zip.ZipException;
 
-import org.apache.commons.compress.archivers.zip.AsiExtraField;
-import org.apache.commons.compress.archivers.zip.UnixStat;
-
 import junit.framework.TestCase;
 
 /**
@@ -31,15 +28,8 @@
  *
  * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  */
-public class AsiExtraFieldTestCase
-    extends TestCase
-    implements UnixStat
+public class AsiExtraFieldTestCase extends TestCase implements UnixStat
 {
-    public AsiExtraFieldTestCase( final String name )
-    {
-        super( name );
-    }
-
     /**
      * Test file mode magic.
      */

Modified: commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ExtraFieldUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ExtraFieldUtilsTestCase.java?rev=669110&r1=669109&r2=669110&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ExtraFieldUtilsTestCase.java
(original)
+++ commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ExtraFieldUtilsTestCase.java
Wed Jun 18 01:35:39 2008
@@ -19,13 +19,6 @@
 
 package org.apache.commons.compress.archivers.zip;
 
-import org.apache.commons.compress.archivers.zip.AsiExtraField;
-import org.apache.commons.compress.archivers.zip.ExtraFieldUtils;
-import org.apache.commons.compress.archivers.zip.UnixStat;
-import org.apache.commons.compress.archivers.zip.UnrecognizedExtraField;
-import org.apache.commons.compress.archivers.zip.ZipExtraField;
-import org.apache.commons.compress.archivers.zip.ZipShort;
-
 import junit.framework.TestCase;
 
 /**
@@ -33,20 +26,13 @@
  *
  * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  */
-public class ExtraFieldUtilsTestCase
-    extends TestCase
-    implements UnixStat
+public class ExtraFieldUtilsTestCase extends TestCase implements UnixStat
 {
     private AsiExtraField m_field;
     private UnrecognizedExtraField m_dummy;
     private byte[] m_data;
     private byte[] m_local;
 
-    public ExtraFieldUtilsTestCase( final String name )
-    {
-        super( name );
-    }
-
     public void setUp()
     {
         m_field = new AsiExtraField();

Modified: commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipEntryTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipEntryTestCase.java?rev=669110&r1=669109&r2=669110&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipEntryTestCase.java
(original)
+++ commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipEntryTestCase.java
Wed Jun 18 01:35:39 2008
@@ -21,12 +21,6 @@
 
 import java.util.NoSuchElementException;
 
-import org.apache.commons.compress.archivers.zip.AsiExtraField;
-import org.apache.commons.compress.archivers.zip.UnrecognizedExtraField;
-import org.apache.commons.compress.archivers.zip.ZipEntry;
-import org.apache.commons.compress.archivers.zip.ZipExtraField;
-import org.apache.commons.compress.archivers.zip.ZipShort;
-
 import junit.framework.TestCase;
 
 /**
@@ -34,14 +28,8 @@
  *
  * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  */
-public class ZipEntryTestCase
-    extends TestCase
+public class ZipEntryTestCase extends TestCase
 {
-    public ZipEntryTestCase( final String name )
-    {
-        super( name );
-    }
-
     /**
      * test handling of extra fields
      */

Modified: commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipLongTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipLongTestCase.java?rev=669110&r1=669109&r2=669110&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipLongTestCase.java
(original)
+++ commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipLongTestCase.java
Wed Jun 18 01:35:39 2008
@@ -19,8 +19,6 @@
 
 package org.apache.commons.compress.archivers.zip;
 
-import org.apache.commons.compress.archivers.zip.ZipLong;
-
 import junit.framework.TestCase;
 
 /**
@@ -28,15 +26,8 @@
  *
  * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  */
-public class ZipLongTestCase
-    extends TestCase
+public class ZipLongTestCase extends TestCase
 {
-
-    public ZipLongTestCase( final String name )
-    {
-        super( name );
-    }
-
     /**
      * Test conversion to bytes.
      */

Modified: commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipShortTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipShortTestCase.java?rev=669110&r1=669109&r2=669110&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipShortTestCase.java
(original)
+++ commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/archivers/zip/ZipShortTestCase.java
Wed Jun 18 01:35:39 2008
@@ -19,8 +19,6 @@
 
 package org.apache.commons.compress.archivers.zip;
 
-import org.apache.commons.compress.archivers.zip.ZipShort;
-
 import junit.framework.TestCase;
 
 /**
@@ -28,14 +26,8 @@
  *
  * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  */
-public class ZipShortTestCase
-    extends TestCase
+public class ZipShortTestCase extends TestCase
 {
-    public ZipShortTestCase( String name )
-    {
-        super( name );
-    }
-
     /**
      * Test conversion to bytes.
      */

Modified: commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/compressors/bzip2/BzipTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/compressors/bzip2/BzipTestCase.java?rev=669110&r1=669109&r2=669110&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/compressors/bzip2/BzipTestCase.java
(original)
+++ commons/sandbox/compress/trunk/src/test/org/apache/commons/compress/compressors/bzip2/BzipTestCase.java
Wed Jun 18 01:35:39 2008
@@ -26,11 +26,10 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import junit.framework.TestCase;
 
 import org.apache.commons.compress.CompressUtils;
-import org.apache.commons.compress.compressors.bzip2.BZip2InputStream;
-import org.apache.commons.compress.compressors.bzip2.BZip2OutputStream;
+
+import junit.framework.TestCase;
 
 /**
  * A test the stress tested the BZip implementation to verify
@@ -39,16 +38,10 @@
  * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  * @version $Revision: 280140 $ $Date$
  */
-public class BzipTestCase
-    extends TestCase
+public class BzipTestCase extends TestCase
 {
     private static final byte[] HEADER = new byte[]{(byte)'B', (byte)'Z'};
 
-    public BzipTestCase( final String name )
-    {
-        super( name );
-    }
-
     public void testBzipOutputStream()
         throws Exception
     {



Mime
View raw message