From ab387d76cf1d3a43ec1943c5c130f06e1c6ec83c Mon Sep 17 00:00:00 2001 From: Edgar Luque Date: Wed, 26 Oct 2022 10:57:50 +0200 Subject: [PATCH] more tests --- src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 1529486..04e6162 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -301,5 +301,14 @@ mod tests { prop_assert!(compressed.len() <= data.len()); prop_assert_eq!(data, decompressed); } + + #[test] + fn proptest_freq_table(data: Vec) { + let table = Huffman::calculate_freq_table(&data); + + for b in &data { + prop_assert!(table.get(b).is_some()); + } + } } } \ No newline at end of file