Index: java/tests/api/java/io/FileInputStreamTest.java =================================================================== --- java/tests/api/java/io/FileInputStreamTest.java (revision 428654) +++ java/tests/api/java/io/FileInputStreamTest.java (working copy) @@ -245,6 +245,26 @@ } /** + * @tests java.io.FileInputStream#skip(long) + */ + public void test_skipNegativeArgumentJ() throws IOException{ + + FileInputStream fis = new java.io.FileInputStream(fileName); + + try { + fis.skip(-5); + fail("IOException must be thrown if number of bytes to skip <0"); + } catch (IOException e) { + // Expected IOException + } catch (Exception e) { + fail("IOException expected, but found: " + e.getMessage()); + } + + fis.close(); + } + + + /** * Sets up the fixture, for example, open a network connection. This method * is called before a test is executed. */