Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

269 improve shrinking prop flat map #513

Open
wants to merge 4 commits into
base: 2.x
Choose a base branch
from

Commits on Sep 22, 2024

  1. Configuration menu
    Copy the full SHA
    52d3a38 View commit details
    Browse the repository at this point in the history
  2. Remove half-open float ranges as Strategies

    The tests didn't pass, and fixing them reliably seems impossible.
    nzeh authored and matthew-russo committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    0a12f7f View commit details
    Browse the repository at this point in the history
  3. Implement improved shrinker for prop_flat_map

    The previous shrinker always shrunk the inner strategy first.  This
    seems to be the wrong thing to do in almost all non-trivial situations
    (e.g., generate a vector length and then a pair of vectors of this
    length).  The new shrinker shrinks the outer strategy first (e.g.,
    tries to minimize the vector length first and then minimizes the entries
    in the vectors).
    
    Given the current implementation of shrinking via simplify/complicate,
    I had a hard time doing this without cloning the inner strategy before
    simplifying it. So there's a breaking change here because prop_flat_map
    now requires the closure to produce a strategy that implements Clone.
    This could have been avoided by a change in how simplify/complicate
    operate, but this has the potential of breaking much more code than
    adding the requirement that the inner strategy is clonable.
    nzeh authored and matthew-russo committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    4deb7d9 View commit details
    Browse the repository at this point in the history
  4. Update CHANGELOG

    nzeh authored and matthew-russo committed Sep 22, 2024
    Configuration menu
    Copy the full SHA
    55049da View commit details
    Browse the repository at this point in the history