From d2dcc07e599d1e088d3ab6a06788f0350ec8c532 Mon Sep 17 00:00:00 2001 From: Alfan Nur Fauzan Date: Mon, 23 Sep 2024 12:11:46 +0700 Subject: [PATCH] simplify testing --- quranize/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/quranize/src/lib.rs b/quranize/src/lib.rs index 62ab930..027b90f 100644 --- a/quranize/src/lib.rs +++ b/quranize/src/lib.rs @@ -79,10 +79,7 @@ mod tests { #[test] fn test_suffix_tree_props() { - let mut t = suffix_tree::SuffixTree::with_capacity(Quranize::EXPECTED_VERTEX_COUNT); - (0..AYA_COUNT) - .zip(QURAN_TXT.split_inclusive('\n')) - .for_each(|(i, s)| t.construct(i, s)); + let t = Quranize::new().tree; assert_eq!(t.vertices.len(), Quranize::EXPECTED_VERTEX_COUNT); assert_eq!(t.vertices.len(), t.edges.len() + 1); assert_eq!(t.count_data(0), 77_883);