Index: D:/user/jimmy/WorkSpace_Ongoing/Harmony Archive/src/test/java/org/apache/harmony/tests/java/util/zip/InflaterInputStreamTest.java =================================================================== --- D:/user/jimmy/WorkSpace_Ongoing/Harmony Archive/src/test/java/org/apache/harmony/tests/java/util/zip/InflaterInputStreamTest.java (revision 0) +++ D:/user/jimmy/WorkSpace_Ongoing/Harmony Archive/src/test/java/org/apache/harmony/tests/java/util/zip/InflaterInputStreamTest.java (revision 0) @@ -0,0 +1,51 @@ +/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.harmony.tests.java.util.zip; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.zip.InflaterInputStream; + +import junit.framework.TestCase; + +public class InflaterInputStreamTest extends TestCase { + public void test_Mark() throws Exception { + 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); + } + + public void test_MarkSupported() throws Exception { + InputStream is = new ByteArrayInputStream(new byte[10]); + InflaterInputStream iis = new InflaterInputStream(is); + assertFalse(iis.markSupported()); + assertTrue(is.markSupported()); + } + + public void test_Reset() throws Exception { + InputStream is = new ByteArrayInputStream(new byte[10]); + InflaterInputStream iis = new InflaterInputStream(is); + try { + iis.reset(); + fail("Should throw IOException"); + } catch (IOException e) { + // correct + } + } +}