fixed test

This commit is contained in:
mamoniot 2022-12-26 23:11:08 -05:00
parent 2c07136b5e
commit e445088cf2

View file

@ -228,7 +228,7 @@ mod tests {
} }
#[test] #[test]
fn counter_window() { fn counter_window() {
let mut rng = 415263; let mut rng = 84632;
let mut counter = u32::MAX - 16; let mut counter = u32::MAX - 16;
let mut fragment_no: u8 = 0; let mut fragment_no: u8 = 0;
let mut history = Vec::<(u32, u8)>::new(); let mut history = Vec::<(u32, u8)>::new();
@ -259,7 +259,7 @@ mod tests {
} }
continue; continue;
} else if p < 0.9995 { } else if p < 0.9995 {
c = counter.wrapping_add(xorshift64(&mut rng)%999); c = xorshift64(&mut rng);
f = (xorshift64(&mut rng)%64) as u8; f = (xorshift64(&mut rng)%64) as u8;
if w.message_received(c, f) { if w.message_received(c, f) {
w.purge(c, f); w.purge(c, f);