Skip to content

[Bug] GuavaTestLib RemoveIf Flag Inconsistencies #6076

Open

Description

I have been working on a Test Library that basically adds support for Primitive Variants of Guavas Test Lib.
And some of my implementations require to change how iterators are checked and I noticed when disabling that the removeIf tests get disabled too.

While looking through that class I noticed that tests check if "SUPPORTS_ITERATOR_REMOVE" flag is set, but if you have the "SUPPORTS_REMOVE" flag missing it tries to test if removeIf throws exceptions.

There is clearly some inconsistencies/bug in there.
https://github.com/google/guava/blob/master/guava-testlib/src/com/google/common/collect/testing/testers/CollectionRemoveIfTester.java

My suggested fix is make them all "SUPPORTS_REMOVE", since the iterator has nothing to do with the removeIf function.
While that there could be a case made for it, though at that point a dedicated flag for lambdas/functions could be made.

Would be nice if this could be addressed, because I kinda either need to copy your class just to fix it or not test removeIf.

Edit: ListListIteratorTester has also these issues, where a dedicated "ITERATOR_MODIFIABLE" would be nice and would simplify the Selection of Features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions