typelevel / scalacheck

Property-based testing for Scala
http://www.scalacheck.org
BSD 3-Clause "New" or "Revised" License
1.94k stars 405 forks source link

Improvement: Add `nonEmptySomeOf` to complement `someOf` #948

Closed vivekragunathan closed 1 year ago

vivekragunathan commented 1 year ago

someOf returns 0 or more elements. Would be handy to have a nonEmptySomeOf similar how there are other complementary non empty versions.

ref: https://github.com/typelevel/scalacheck/pull/944#issuecomment-1480252026

ashawley commented 1 year ago

I believe atLeastOne already provides nonEmptySomeOf.

vivekragunathan commented 1 year ago

Darn .. I did not know such a method already exists. Naming is always tripping. Closing this issue/PR.

ashawley commented 1 year ago

Yes the naming is confusing because it's not always consistent. Sometimes the generator's name describes what is done with the arguments and other times it's based on the values returned by the generator.