Skip to content

Commit 15ad418

Browse files
committed
chore: add test
1 parent 2271b70 commit 15ad418

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,17 @@ mod tests {
264264
assert_eq!(expected, output);
265265
}
266266

267+
#[cfg(feature = "portable")]
268+
#[test]
269+
fn test_portable_hashing() {
270+
let input: Vec<u8> = b"hello world".as_ref().into();
271+
272+
let output = hash(input.as_ref());
273+
let expected_hex = "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9";
274+
let expected: Vec<u8> = expected_hex.from_hex().unwrap();
275+
assert_eq!(expected, output);
276+
}
277+
267278
#[cfg(feature = "zero_hash_cache")]
268279
mod zero_hash {
269280
use super::*;

0 commit comments

Comments
 (0)