summaryrefslogtreecommitdiff
path: root/src/test/java/au/id/zancanaro/javacheck
AgeCommit message (Collapse)Author
2015-06-09Generalise the ObjectGeneration stuffCarlo Zancanaro
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.
2015-06-09Add an ObjectGenerator<>, and related machinery (also a mapOf generator)Carlo Zancanaro
2015-06-09Clean up importsCarlo Zancanaro
2015-06-06Lots of work on the stateful checking stuff: it's a fair bit nicer nowCarlo Zancanaro
2015-06-05More work on the stateful checker; still not perfect, but it's getting betterCarlo Zancanaro
2015-06-05First cut of a stateful testing framework (it's pretty hacky at the moment, ↵Carlo Zancanaro
but all the pieces are there)
2015-06-04Static imports for a test, just to make it read a little bit more nicelyCarlo Zancanaro
2015-06-03Change shrinking a bit, add more generators, fix some types, moved suchThatCarlo Zancanaro
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.
2015-06-03Add some more interesting testsCarlo Zancanaro
2015-06-01Fix up list shrinking, remove minor superfluous thingsCarlo Zancanaro
2015-06-01Move packages, make lists shrink in size, generate lists instead of arrays ↵Carlo Zancanaro
as the 'primitive' operation (issues with generics)