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

Improve integer shrinking #743

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Dec 29, 2020

  1. Test that numeric shrinkers are acyclic, via a strict partial order

    We all know that we shrink towards 0 and from negative to positive.
    Formalizing this is simple and strengthens the typelevel#244 regression tests.
    jonaskoelker committed Dec 29, 2020
    Configuration menu
    Copy the full SHA
    4590703 View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2020

  1. Optimize shrinking of integral types

    So long as the test case keeps succeeding, shrink to the next query
    value of a binary search that searches for the smallest failing value.
    
    That is, try the midpoint between the most recent test failure and the
    previous shrunk value: x => x * (1 - 1/2^k) for natural numbers k.
    
    For example, `shrink(32).toList == List(0, 16, 24, 28, 30, 31)`.
    jonaskoelker committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    ae498a3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f5a3434 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2021

  1. Configuration menu
    Copy the full SHA
    374db9f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    85c88ee View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    294a250 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e330902 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2021

  1. Configuration menu
    Copy the full SHA
    e893cd1 View commit details
    Browse the repository at this point in the history