Here are the test cases:
#[test]
fn generate_compact_multiproof_sanity_check() {
let sentence = "Here's an eight word sentence, special for you.";
let indices = vec![0, 1, 6];
let expected = (
14965309246218747603,
CompactMerkleMultiProof {
leaf_indices: vec![0, 1, 6],
hashes: vec![
1513025021886310739,
7640678380001893133,
5879108026335697459,
],
},
);
assert_eq!(expected, generate_compact_multiproof(sentence, indices));
}
#[test]
fn validate_compact_multiproof_sanity_check() {
let proof = (
14965309246218747603u64,
CompactMerkleMultiProof {
leaf_indices: vec![0, 1, 6],
hashes: vec![
1513025021886310739,
7640678380001893133,
5879108026335697459,
],
},
);
let words = vec!["Here's", "an", "for"];
assert_eq!(true, validate_compact_multiproof(&proof.0, words, proof.1));
}