qcheck/shrink

This module provides helpers for shrinking values.

You likely won’t be interacting with this module directly.

Functions

pub fn atomic() -> fn(a) -> Iterator(a)

The atomic shrinker treats types as atomic, and never attempts to produce smaller values.

pub fn float_towards(
  destination destination: Float,
) -> fn(Float) -> Iterator(Float)
pub fn float_towards_zero() -> fn(Float) -> Iterator(Float)
pub fn int_towards(
  destination destination: Int,
) -> fn(Int) -> Iterator(Int)
pub fn int_towards_zero() -> fn(Int) -> Iterator(Int)
pub fn shrink(
  tree: Tree(a),
  property: fn(a) -> Bool,
  run_property_max_retries run_property_max_retries: Int,
) -> a
pub fn shrink_result(
  tree: Tree(a),
  property: fn(a) -> Result(b, c),
  run_property_max_retries run_property_max_retries: Int,
) -> a
Search Document