Hello

I've added a couple of regression tests to
test/java/tests/api/java/io/RandomAccessFileTest.java
and a bit reorganized remaining tests to get them close to conventions
we discussed somewhere here recently.

I've noticed that there are tests that are looking very similar, for example:

/**
  * @tests java.io.RandomAccessFile#readBoolean()
*/
public void test_readBoolean() throws IOException {
    // Test for method boolean java.io.RandomAccessFile.readBoolean()
    RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
    raf.writeBoolean(true);
    raf.seek(0);
    assertTrue("Incorrect boolean read/written", raf.readBoolean());
    raf.close();
}

and


/**
* @tests java.io.RandomAccessFile#writeBoolean(boolean)
*/
public void test_writeBooleanZ() throws IOException {
    // Test for method void java.io.RandomAccessFile.writeBoolean(boolean)
    RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
    raf.writeBoolean(true);
    raf.seek(0);
    assertTrue("Incorrect boolean read/written", raf.readBoolean());
    raf.close();
}

I understand that in general we might have couples of equivalent tests that
designed to test different scenarios (because when we change one of those tests
the second one still cover the second scenario...), but do we need this kind of
duplication here?

Thanks,
Mikhail

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to