----- Original Message -----
From: "Michael A. Smith" <[EMAIL PROTECTED]>
To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 2:10 PM
Subject: Re: cvs commit:
jakarta-commons/collections/src/test/org/apache/commons/collections
TestMap.java TestSequencedHashMap.java


> On 21 Feb 2002 [EMAIL PROTECTED] wrote:
> > morgand     02/02/21 11:57:33
> >
> >   Modified:    collections/src/test/org/apache/commons/collections
> >                         TestMap.java TestSequencedHashMap.java
> >   Log:
> >   unit test to reproduce a SequencedHashMap 1.3 bug
>
> I actually found the bug I fixed from 1.3 to 1.4 through a unit test I've
> written but not yet committed.  I was up 'til 3am list night trying to
> finish it all and get it in, but the BeanMap has caused me some problems.
> It doesn't implement a lot of map interface correctly, so many of my
> generic map tests are failing for it.
>
> Should I go ahead and commit my new test cases, or should I wait until I
> have BeanMap fixed up so it doesn't cause quite as many failures?

Go ahead and commit your changes to the unit tests, don't worry about
BeanMap yet.  Actually, if you have unit tests that reproduce actual BeanMap
problems, you should definitely commit them.  Someone may be able to fix it
for you.  I like to commit tests that fail and then commit the fix, rather
than committing a fix that isn't confirmed by an existing unit test (but
sometimes I'm lazy ;).

>
> btw, my test cases use methods rather than a marker interface to determine
> whether certain operations are allowed.
>
> For example:
>
>   public boolean useNullKeys() {
>     return true;
>   }
>
> I think this works better because if you have a class that supports all
> operations, and its subclassed by a class that does not, you can still
> override the testing behavior.  With the marker interfaces, once you've
> implemented the interface, all test subclasses also implement that marker
> interface.
>

You're right, that is better.  Feel free to tear it up.

- Morgan



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

Reply via email to