DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32921>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32921





------- Additional Comments From [EMAIL PROTECTED]  2005-01-05 19:21 -------
Created an attachment (id=13901)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=13901&action=view)
JUnit test case for SortedVIntList

The only change needed to SortedVIntList to pass the tests
is the  "+ 1" in the BitSet constructor as Mark noted:

  public SortedVIntList(BitSet bits) {
    initBytes();

    int lastInt = 0;
    int nextInt = bits.nextSetBit(lastInt);
    while (nextInt != -1) {
      add(nextInt, lastInt);
      lastInt = nextInt;
      nextInt = bits.nextSetBit(lastInt + 1); // correction here
    }

    resizeBytes(lastBytePos);
  }

so I'm not attaching the corrected version.

The test code suppresses the test BitSet test for
some special cases: too large integers that cause
too much memory used in the BitSet, and duplicates
in the list of integers that cannot be represented
in a BitSet.

I'll try and not post untested code again :)

Regards, and thanks again Mark,
Paul Elschot


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to