alloy-rs / alloy-rs/ruint

`support/proptest`: Would be nice to have a value range as parameter

Open
#94 0 comments 0 reactions 1 assignee Claimed by @recmo View on GitHub
feature tracker
Dominant language
Rust
Stars
225
Forks
70
Avg merge
16h 54m
Merged PRs (30d)
8

Description

*On 2022-05-28 @recmo wrote in [`1ec2e50`](https://github.com/recmo/uint/commit/1ec2e50003548890260e8c06886f44fd826bc07b) “Recognize new tags”:*

Would be nice to have a value range as parameter
and/or a choice between uniform and 'exponential' distribution.

```rust
num::u64::Any,
strategy::{BoxedStrategy, Strategy},
};

impl Arbitrary for Uint {
// FEATURE: Would be nice to have a value range as parameter
// and/or a choice between uniform and 'exponential' distribution.
type Parameters = ();
type Strategy = BoxedStrategy;

fn arbitrary_with(_: Self::Parameters) -> BoxedStrategy {
// OPT: Copy [`UniformArrayStrategy`] to avoid heap allocations

```
*From [`src/support/proptest.rs:11`](https://github.com/recmo/uint/blob/1ec2e50003548890260e8c06886f44fd826bc07b/src/support/proptest.rs#L11)*

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.