Skip to content

Commit 170a09a

Browse files
authored
add test
1 parent b5e28c9 commit 170a09a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

bash-hash/tests/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,13 @@ test_bash_rand!(
4646
digest::hash_serialization_test!(bash256_serialization, BashHash256);
4747
digest::hash_serialization_test!(bash384_serialization, BashHash384);
4848
digest::hash_serialization_test!(bash512_serialization, BashHash512);
49+
50+
#[test]
51+
fn algorithm_name() {
52+
let s = format!("{:?}", BashHash256::new());
53+
assert!(s.contains("BashHash256"), "expected BashHash256, got: {s}");
54+
let s = format!("{:?}", BashHash384::new());
55+
assert!(s.contains("BashHash384"), "expected BashHash384, got: {s}");
56+
let s = format!("{:?}", BashHash512::new());
57+
assert!(s.contains("BashHash512"), "expected BashHash512, got: {s}");
58+
}

0 commit comments

Comments
 (0)