diff --git a/firewood/tests/merkle.rs b/firewood/tests/merkle.rs index e4b553d6e..07d3f84c3 100644 --- a/firewood/tests/merkle.rs +++ b/firewood/tests/merkle.rs @@ -30,8 +30,7 @@ fn merkle_build_test + std::cmp::Ord + Clone, V: AsRef<[u8]> + Cl } #[test] -#[allow(unused_must_use)] -fn test_root_hash_simple_insertions() { +fn test_root_hash_simple_insertions() -> Result<(), DataStoreError> { let items = vec![ ("do", "verb"), ("doe", "reindeer"), @@ -40,13 +39,15 @@ fn test_root_hash_simple_insertions() { ("horse", "stallion"), ("ddd", "ok"), ]; - let merkle = merkle_build_test(items, 0x10000, 0x10000).unwrap(); - merkle.dump(); + let merkle = merkle_build_test(items, 0x10000, 0x10000)?; + + merkle.dump()?; + + Ok(()) } #[test] -#[allow(unused_must_use)] -fn test_root_hash_fuzz_insertions() { +fn test_root_hash_fuzz_insertions() -> Result<(), DataStoreError> { use rand::{rngs::StdRng, Rng, SeedableRng}; let rng = std::cell::RefCell::new(StdRng::seed_from_u64(42)); let max_len0 = 8; @@ -65,14 +66,17 @@ fn test_root_hash_fuzz_insertions() { .collect(); key }; + for _ in 0..10 { let mut items = Vec::new(); for _ in 0..10 { let val: Vec = (0..8).map(|_| rng.borrow_mut().gen()).collect(); items.push((keygen(), val)); } - merkle_build_test(items, 0x1000000, 0x1000000); + merkle_build_test(items, 0x1000000, 0x1000000)?; } + + Ok(()) } #[test]