spock-genesis
spock-genesis copied to clipboard
Mostly lazy data generators for property based testing using the Spock test framework
I was about to test my [Gradle PR](https://github.com/gradle/gradle/pull/10724), and unfortunately StringGenerator fails to support happy smiles :( For instance: ```groovy @Unroll def randomManifest() { when: println(string.length() + " " +...
While working with spock-genesis I had the need for a LocalDate generator. I was able to get round this using the LongGenerator but here is a PR for a native...
i ran into a lot of random test failures for something that had static Generator ints(){ Gen.list( Gen.these(1,2,3), 2, 2 ) } I expected to only get 1 entry (no...
maybe implemented with something like ``` static Stream skugroupStream() { StreamSupport.stream( Spliterators.spliteratorUnknownSize( skugroup().iterator(), Spliterator.ORDERED ), false ) } ``` reason: i write generators in groovy but they are consumed as...
Sometimes I want to control a generator based on the value generated from another. A simple case is where some value should be one of several subclasses. For example `flatMap`...
Current coverage is around 75%.
so i get iterator to iterable transition (kind of) but I often just called Generator.next() to get 1 random thing and now i have to call iterator() before...is there a...
Tuples isFinite only returns true if EVERY generator in the tuple is finite...but it only generates a value as long as one ofthe generators can...so isFinite should be true if...
Is there a way to define a map generator that takes permutations of finite value generators, and considers any infiinite value generators in the map as noise, so irrelevant for...