mirror of
https://github.com/edg-l/rustyman.git
synced 2024-11-22 07:58:20 +00:00
more tests
This commit is contained in:
parent
37a5d75e3b
commit
ab387d76cf
|
@ -301,5 +301,14 @@ mod tests {
|
||||||
prop_assert!(compressed.len() <= data.len());
|
prop_assert!(compressed.len() <= data.len());
|
||||||
prop_assert_eq!(data, decompressed);
|
prop_assert_eq!(data, decompressed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn proptest_freq_table(data: Vec<u8>) {
|
||||||
|
let table = Huffman::calculate_freq_table(&data);
|
||||||
|
|
||||||
|
for b in &data {
|
||||||
|
prop_assert!(table.get(b).is_some());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue