You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Jack, Paul" <pj...@sfaf.org> on 2002/06/04 02:21:43 UTC

[PATCH][Collections] New testing framework, patch #2

(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