more tests

This commit is contained in:
Edgar 2022-10-26 10:57:50 +02:00
parent 37a5d75e3b
commit ab387d76cf
No known key found for this signature in database

View file

@ -301,5 +301,14 @@ mod tests {
prop_assert!(compressed.len() <= data.len());
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());
}
}
}
}