You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[parameterized( seeding_randomness_with_two_dice_rolls = { roll_dice(&AtomicU32::new(0)),// <- This is an expression (a function call){// <- This is also an expression (a block expression)let from_half = roll_dice(&AtomicU32::new(u32::MAX / 2));let from_max = roll_dice(&AtomicU32::new(u32::MAX));u8::min(from_half, from_max)}})]fndicey(seed1:u8,seed2:u8){// Creating a base seed in a complicated way for the sake of it.let max = u8::max(seed1, seed2);let seed = AtomicU32::new(u32::from(max));let out_of_bounds_values = (0..1000)// roll the dice 1000 times.map(|_| roll_dice(&seed)).find(|value| !(1..=6).contains(value));// check that the outputs of the dice are just 1, 2, 3, 4, 5 or 6. assert!(out_of_bounds_values.is_none());}
Activity
Merge pull request assert-rs#19 from epage/t
epage commentedon Oct 20, 2025
From #13 (comment)
epage commentedon Oct 20, 2025
Should
#[ignore]functions have access to parameters and fixtures?epage commentedon Oct 29, 2025
https://crates.io/crates/parameterized/2.0.0 has lists of values for each paramter
while https://crates.io/crates/yare/3.0.0 has named sets of parameters