You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "George Harley (JIRA)" <ji...@apache.org> on 2006/06/19 13:20:30 UTC

[jira] Assigned: (HARMONY-575) [classlib][tesing]Refactor ByteBuffer testcases in org.apache.harmony.tests.java.nio

     [ 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira