On Mon, 19 Nov 2001 14:23, Chad Stansbury wrote:
> Peter -
>
> I've made a few changes to the code, the diffs of which are below...  In
> short, I've change the private modifier on the two comparators to public
> (from private) so that they can be used in the constructor, I've changed
> the 'isMinHeap' constructor to use the comparable constructor to eliminate
> duplication of code, I've added a size() accessor, and I've added comments
> to the stuff I've added.

bool - I finally got around to committing this - thanks!

> Attached is the latest & greatest BinaryHeap.java + a TestBinaryHeap.java
> that contains some of the code I used to test my previous n-ary heap.  Note
> that I wrote the n-ary heap quite a while ago using my own unit test
> harness, and I've done little work with JUnit... perhaps you have the time
> to put it in an format acceptable to JUnit.  You'll notice also that I
> commented out the code that tests inserting a null element - because the
> current BinaryHeap does not prevent inserting null elements - something
> that I think you might want to change...

Okays - I just realized we did already have a unit test for BinaryHeap ... I 
even wrote it - not sure why I missed it last time I was checking for tests. 
Anyways I will add in the null check and your test cases into the testcase 
when I have time.

Thanks again!

-- 
Cheers,

Pete

When a stupid man is doing something he's ashamed of, he always 
declares that it is his duty.
                                         George Bernard Shaw 

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

Reply via email to