Skip to content

[#594] Add configurable `Mutez` hedgehog generator

Diogo Castro requested to merge diogo/#594-gen-mutez into master

Description

Problem: At the moment, Cleveland offers a Mutez generator that uses the type's full range. However, in tests, you usually want the generated values to be constrained to a certain range.

Solution: add a hedgehog generator for Mutez whose range can be configured by the user. In order to be able to construct a mutez range, we also have to have an instance of Integral for Mutez in scope, so we added that instance as well.

Related issue(s)

Resolves #594 (closed)

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Merge request reports