commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack, Paul" <pj...@sfaf.org>
Subject [PATCH][Collections] New testing framework, patch #2
Date Tue, 04 Jun 2002 00:21:43 GMT
(This patch can be applied independently of patch #1).

Revamped TestCollection.  Most of the old tests relied on 
add() and addAll() to initially populate a collection.  This
won't work for map collection views because they don't support
the add() and addAll() operations.

I also made TestCollection operate more like TestMap; there
are methods that return empty and full collections, and 
separate methods that tell you what elements a full collection
should contain and what elements a full collection should
not contain.

The TestCollection tests are also more strict; they will detect
many more violations of the Collection contract than the old
tests.  As such, applying this patch will introduce 12 failures 
into the build.  All of the failures relate to Bug #9467 (Bag
violates Collection contract).  I'll submit a separate patch
for that bug shortly.

This patch contains:

1.  Massive alterations to TestCollection.java.
2.  Slight alterations to TestCursorableLinkedList, because it does
not support null values; and slight alterations to TestTreeBag,
because it requires mutually comparable elements.

The next patch will alter TestMap to use TestCollection bulk 
tests on its collection views.

-Paul



Mime
View raw message