harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Harley (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-575) [classlib][tesing]Refactor ByteBuffer testcases in org.apache.harmony.tests.java.nio
Date Mon, 19 Jun 2006 11:20:30 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-575?page=all ]

George Harley reassigned HARMONY-575:

    Assign To: George Harley

> [classlib][tesing]Refactor ByteBuffer testcases in org.apache.harmony.tests.java.nio
> ------------------------------------------------------------------------------------
>          Key: HARMONY-575
>          URL: http://issues.apache.org/jira/browse/HARMONY-575
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: George Harley
>     Priority: Minor
>  Attachments: Harmony575_patch.zip
> The current testcases for buffers are organized in some unusual way - test logic are
written in many static methods, and some instance method testXXX call them one by one. I guess
the purpose is to test buffers constructed in different ways(allocate, wrap, asXXXBuffer,
duplicate, slice, etc)
> This desgin have some drawbacks :
> 1. If one assertion fails, the following ones will not be executed .
> 2. It is hard to determine the actual position where the failure happens .
> 3. The codes are difficult to understand or extend, if someone want to add one more test
method, he may need to add one static method, and add the method invocation to some instance
testXXX methods.
> I propose to refactor them and to organize them to classes hierarchy, for example, an
abstract ByteBufferTest, and several subclass such as DirectByteBufferTest, HeapByteBufferTest,
WrappedByteBufferTest, etc.  I'll provide patch for ByteBuffer at first as a pilot, and if
it is acceptted, I'll raise JIRA and provide patch for other bufers(char, int, float, etc)
one by one.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message