remove redundant test

rust
Avril 4 years ago
parent 55ea30fcf8
commit 114472559e
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -13,29 +13,6 @@ mod shuffle;
fn main() {
println!("Hello, world!");
#[cfg(test)] {
let mut values: Vec<_> = (0..100000i32).collect();
let expected = values.clone();
let mut rng = {
use rand::prelude::*;
rand_chacha::ChaChaRng::from_seed([0xfa; 32])
};
let mut nrng = rng.clone();
println!("Start (first 10): {:?}", &values[..10]);
values.shuffle(&mut rng);
println!("Shuffled (first 10): {:?}", &values[..10]);
values.unshuffle(&mut nrng);
println!("Unshuffled (first 10): {:?}", &values[..10]);
assert_eq!(&values[..], &expected[..]);
}
}
#[cfg(test)] mod test;

Loading…
Cancel
Save