commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Smith" <mich...@iammichael.org>
Subject Re: cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections TestMap.java TestSequencedHashMap.java
Date Thu, 21 Feb 2002 20:27:53 GMT
On Thu, 21 Feb 2002, Morgan Delagrange wrote:
> 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 ;).

good point.  I'm not sure the problems are real "bugs", but the BeanMap
contract differs from the Map contract.  The "fixes" might be as simple as
documenting the deviations from the Map contract in BeanMap and overriding
the tests to test the different contract.  There may be some bugs in there 
too though.

I'll get what I have committed once I get home from work and get some food 
in my stomach.

> > 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.

was planning on it.  :)

regards,
michael


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message