summaryrefslogtreecommitdiff
path: root/src/main/java/au/id/zancanaro/javacheck/Iterators.java
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@zancanaro.id.au>2015-06-03 19:43:14 +1000
committerCarlo Zancanaro <carlo@zancanaro.id.au>2015-06-03 19:43:14 +1000
commite0fc94269698982d937b80ff5fd5b1ef8ef28cf4 (patch)
tree22c335361971363d6856a59ef0c54242f92e74e1 /src/main/java/au/id/zancanaro/javacheck/Iterators.java
parent7b1a783b749ab04ab8219ef28f9b1abb0ded6ca4 (diff)
Change shrinking a bit, add more generators, fix some types, moved suchThat
Shrinking is now done using a "ShrinkStrategy". It's pretty similar to what it used to be in the end, but instead of generating new ShrinkTree<T>s yourself, you just generate smaller <T>s, and the generator framework will re-call your strategy to shrink smaller elements. (So, essentially, ShrinkStrategy.shrink(T obj) returns an Iterator<T> which then has smaller trees calculated from it.) Added some more generators. In particular: longs and doubles. Fixed some types, so now Generator.tuple(integer(), string()) will work. Yay! Move suchThat to Generator, so now integer().suchThat(x -> x < 10) will work instead of the old Generators.suchThat(x -> x < 10, integer()), which felt a bit weird.
Diffstat (limited to 'src/main/java/au/id/zancanaro/javacheck/Iterators.java')
0 files changed, 0 insertions, 0 deletions