Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tkaitchuck/aHash into fast_path_h…
Browse files Browse the repository at this point in the history
…ardening
  • Loading branch information
tkaitchuck committed Feb 29, 2024
2 parents a55b148 + 3ac041a commit 680ab00
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,11 @@ mod test {

#[test]
fn test_add_length() {
let mut enc = (u64::MAX as u128) << 64 | 50;
let enc : [u64; 2] = [50, u64::MAX];
let mut enc : u128 = enc.convert();
add_in_length(&mut enc, u64::MAX);
assert_eq!(enc >> 64, u64::MAX as u128);
assert_eq!(enc as u64, 49);
let enc : [u64; 2] = enc.convert();
assert_eq!(enc[1], u64::MAX);
assert_eq!(enc[0], 49);
}
}

0 comments on commit 680ab00

Please sign in to comment.