You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2012/03/04 06:30:15 UTC

svn commit: r1296751 - /commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java

Author: bodewig
Date: Sun Mar  4 05:30:14 2012
New Revision: 1296751

URL: http://svn.apache.org/viewvc?rev=1296751&view=rev
Log:
some additional test cases

Modified:
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java?rev=1296751&r1=1296750&r2=1296751&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java (original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java Sun Mar  4 05:30:14 2012
@@ -139,15 +139,19 @@ public class TarUtilsTest extends TestCa
     public void testRoundTripOctalOrBinary8() {
         testRoundTripOctalOrBinary(8);
     }
+
     public void testRoundTripOctalOrBinary12() {
         testRoundTripOctalOrBinary(12);
+        checkRoundTripOctalOrBinary(Long.MAX_VALUE, 12);
+        checkRoundTripOctalOrBinary(Long.MIN_VALUE + 1, 12);
     }
+
     private void testRoundTripOctalOrBinary(int length) {
         checkRoundTripOctalOrBinary(0, length);
         checkRoundTripOctalOrBinary(1, length);
-        checkRoundTripOctalOrBinary(Long.MAX_VALUE >> 7, length); // [0x00 ff ff ff ff ff ff ff
         checkRoundTripOctalOrBinary(TarConstants.MAXSIZE, length); // will need binary format
         checkRoundTripOctalOrBinary(-1, length); // will need binary format
+        checkRoundTripOctalOrBinary(0xff00000000000001l, length);
     }
     
     // Check correct trailing bytes are generated