You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/05/05 21:28:45 UTC

svn commit: r400150 - /incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java

Author: tellison
Date: Fri May  5 12:28:41 2006
New Revision: 400150

URL: http://svn.apache.org/viewcvs?rev=400150&view=rev
Log:
Added tests for HARMONY-160 (Three JSE 5 methods are not implemented in java.util.zip.InflaterInputStream)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java?rev=400150&r1=400149&r2=400150&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java Fri May  5 12:28:41 2006
@@ -101,9 +101,31 @@
 		inflatIP.close();
 	}
 
+    /**
+     * @tests java.util.zip.InflaterInputStream#mark(int)
+     */
+    public void test_markI() {
+        InputStream is = new ByteArrayInputStream(new byte[10]);
+        InflaterInputStream iis = new InflaterInputStream(is);
+        // mark do nothing, do no check
+        iis.mark(0);
+        iis.mark(-1);
+        iis.mark(10000000);
+    }
+
+    /**
+     * @tests java.util.zip.InflaterInputStream#markSupported()
+     */
+    public void test_markSupported() {
+        InputStream is = new ByteArrayInputStream(new byte[10]);
+        InflaterInputStream iis = new InflaterInputStream(is);
+        assertFalse(iis.markSupported());
+        assertTrue(is.markSupported());
+    }
+
 	/**
-	 * @tests java.util.zip.InflaterInputStream#read()
-	 */
+     * @tests java.util.zip.InflaterInputStream#read()
+     */
 	public void test_read() throws IOException {
 		int result = 0;
 		int buffer[] = new int[500];
@@ -135,6 +157,20 @@
 		// TODO
 	}
 
+    /**
+     * @tests java.util.zip.InflaterInputStream#reset()
+     */
+    public void test_reset() {
+        InputStream is = new ByteArrayInputStream(new byte[10]);
+        InflaterInputStream iis = new InflaterInputStream(is);
+        try {
+            iis.reset();
+            fail("Should throw IOException");
+        } catch (IOException e) {
+            // correct
+        }
+    }
+        
 	/**
 	 * @tests java.util.zip.InflaterInputStream#skip(long)
 	 */