Age | Commit message (Collapse) | Author |
|
|
|
|
|
The new ObjectGeneration stuff is now used to generate everything for a test
case, which means it's all unified and "nice" now.
Add a @UseGenerator annotation to be used to specify how to generate specific
field values.
Obviously, not everything can be generated magically, so if you specify a
@DataSource in your test then it will be used in preference to any magically
generated value.
|
|
|
|
|
|
|
|
|
|
but all the pieces are there)
|
|
|
|
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.
|
|
|
|
|
|
as the 'primitive' operation (issues with generics)
|
|
|
|
|
|
+ add a list generator, and some more number generators.
+ bugfix the assumption checking stuff: if it failed once it would pretty
likely continue to fail!
+ write some simple actualy properties:
- reverse . reverse = id
- sort . sort = sort
|
|
In particular:
+ make output more sane and less all over the place
+ just ignore original exception, the shrunk one is the only one which really
matters
+ fit into the jUnit framework more (so now @Before, @After and stuff work)
|
|
|
|
|