sageserpent-open / americium

Generation of test case data for Scala and Java, in the spirit of QuickCheck. When your test fails, it gives you a minimised failing test case and a way of reproducing the failure immediately.
MIT License
15 stars 1 forks source link

Case Study - Curium #25

Closed sageserpent-open closed 2 years ago

sageserpent-open commented 2 years ago

Having mentioned Curium as a project that uses Scalacheck's Arbitrary that could potentially benefit from Amercium's Trials, it's time to try cutting it over.

sageserpent-open commented 2 years ago

The cutover is done, but has exposed the need for the following:

  1. A Trials.bytes streaming factory that allows shrinkage.
  2. Bounds on Trials.integers, or at least some convenience methods to yield strictly positive integers etc.
  3. Generalise the return type of the Trials.and combinator to implement Trails[Tuple2[X, Y]] etc so that client code doesn't have to pull in an explicit dependency on Cats to make trials of tuples. Not sure if this is going to result in trouble due to ambiguity, when calling withLimit and then supplyTo ...
sageserpent-open commented 2 years ago

Implemented 1) and 2) from the above comment and have done some more work in Curium. The only things left on the wish list for Trials is:

a) bounds on Trials.doubles and b) a sample method on a trials.

A nice to have would be some fluent syntax to override the default randomisation seed used internally for the implementation of Trials.

sageserpent-open commented 2 years ago

Fixed by commit 1c799582b94f138f5ff2cbd09e458fe69a596f94 in the Curium repository.