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

feat(bolero-generator): add support for calling generators from anywhere #258

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

camshaft
Copy link
Owner

@camshaft camshaft commented Nov 25, 2024

This change introduces the bolero_generator::any module, which enables calling generators from anywhere in the program.

use bolero_generator::prelude::*;

let value: u64 = any();
let value: u64 = (0..3).any();
let value = gen::<Vec<u8>>().any();
let value = gen::<Vec<u8>>().with().len(2..4).any();

@camshaft camshaft force-pushed the gen-any branch 10 times, most recently from cea8445 to 8c0cc51 Compare November 26, 2024 18:17
@camshaft camshaft changed the title feat: add support for calling generators from anywhere feat(bolero-generator): add support for calling generators from anywhere Nov 26, 2024
@camshaft camshaft marked this pull request as ready for review November 26, 2024 18:47
@camshaft camshaft merged commit e01216c into master Nov 26, 2024
9 checks passed
@camshaft camshaft deleted the gen-any branch November 26, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant