harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r400150 - /incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java
Date Fri, 05 May 2006 19:28:45 GMT
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)
 	 */



Mime
View raw message