You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test case: Arb.list(Arb.constant(null), 1..100).edgecases().forAll { }
Expected: Passes and generates lists of null with a variable length.
Actual: java.util.NoSuchElementException: Collection is empty. in collections.kt, Line 108.
Note: This passes if the lower boundary is set to 0.
Currently, edge cases returning null will lead to the conclusion "there is no edge case for this arb" and subsequently fall back to use a random value. If this is null, too, then the particular edge case for the list is ignored. However, this is not only incorrect (either the edge case or the random value might actually be null), but causes no edge case to be left; therefore the random selection of edge cases fails with "Collection is empty."
I'll submit a PR to address this.
The text was updated successfully, but these errors were encountered:
This shall fix the issue as described in
#3981.
Instead of just assuming that a null value means "there is no edge
case", this change adds explicitly checking that, effectively fixing the
problem.
Test case:
Arb.list(Arb.constant(null), 1..100).edgecases().forAll { }
Expected: Passes and generates lists of null with a variable length.
Actual:
java.util.NoSuchElementException: Collection is empty.
in collections.kt, Line 108.Note: This passes if the lower boundary is set to
0
.Currently, edge cases returning null will lead to the conclusion "there is no edge case for this arb" and subsequently fall back to use a random value. If this is null, too, then the particular edge case for the list is ignored. However, this is not only incorrect (either the edge case or the random value might actually be null), but causes no edge case to be left; therefore the random selection of edge cases fails with "Collection is empty."
I'll submit a PR to address this.
The text was updated successfully, but these errors were encountered: