Renamed supportsAdd and supportsRemove to isAddSupported and isRemoveSupported.
Removed commented out tests for equals and hashCode (the collection contract does not specify a specific contract on equals and hashCode), and added a comment at the top of the class so that no one comes in later and re-adds the test cases. Removed dependence on HashBag. If HashBag has a bug, this may adversly affect the tests that are using it. Reimplemented without using HashBag. Modified tests that used makeFullCollection and makeCollection to use the fixture field "collection" along with resetEmpty() and resetFull(). This allowed for more calls to verify to ensure that calls to methods that should not modify a collection don't actually modify it. When removing using the iterator, an equivalent operation cannot really be performed on the confirmed collection for verification. After some investigation, changed the existing tests (tested for instances of Set, List and Bag) to one that is a bit more generic: A new flag (that test subclasses can override) which specifies whether the elements in the collection are distinguishable from each other (and such that it might matter which element is actually removed from the collection when the iterator's remove method is called). git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130722 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b79307f302
commit
10e245918f