From 063634cc1bb3564a4e961c8abc7b9022d2b0e345 Mon Sep 17 00:00:00 2001 From: 0xKitsune <0xKitsune@protonmail.com> Date: Tue, 16 Apr 2024 20:11:05 -0400 Subject: [PATCH] formatting --- src/cascading_merkle_tree.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cascading_merkle_tree.rs b/src/cascading_merkle_tree.rs index 14cf94c..f3e9816 100644 --- a/src/cascading_merkle_tree.rs +++ b/src/cascading_merkle_tree.rs @@ -928,14 +928,19 @@ mod tests { #[test] fn test_extend_from_slice() -> color_eyre::Result<()> { let leaves = (0..1 << 5).into_iter().map(Field::from).collect::>(); + + // Create expected tree let expected_tree = CascadingMerkleTree::::new_with_leaves(vec![], 10, &Field::ZERO, &leaves); + let mut tree = CascadingMerkleTree::::new(vec![], 10, &Field::ZERO); tree.extend_from_slice(&leaves); + assert_eq!( tree.leaves().collect::>(), expected_tree.leaves().collect::>() ); + assert_eq!(tree.root(), expected_tree.root()); Ok(()) }