Add one more test for the hash.
This commit is contained in:
parent
c585e38a54
commit
e81beb733e
|
@ -217,20 +217,27 @@ mod test {
|
|||
|
||||
#[test]
|
||||
fn hash_string_02() {
|
||||
let s = "abcdefghijklmnopqrstuvwxyz";
|
||||
let correct_digest = "dc59a6c0f41de0fbe405de9947fda7bab362b4fff00b02f0cda56d47a42dbfa8";
|
||||
assert_eq!(digest_to_string(hash(s.as_bytes())), correct_digest);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hash_string_03() {
|
||||
let s = "The quick brown fox jumps over the lazy dog.";
|
||||
let correct_digest = "7f69ce128ed82ed4bc8b8993b52555cf7e960669a8fd141b590b9e3d6e545b53";
|
||||
assert_eq!(digest_to_string(hash(s.as_bytes())), correct_digest);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hash_string_03() {
|
||||
fn hash_string_04() {
|
||||
let s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
let correct_digest = "1f8676c857099cf4fad280a6a9305f372e0d75341e52aa2b9cb3906324f9a4c7";
|
||||
assert_eq!(digest_to_string(hash(s.as_bytes())), correct_digest);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hash_string_04() {
|
||||
fn hash_string_05() {
|
||||
let s = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
|
||||
let correct_digest = "61675e48dd173196dc348114ef5dd1f38a04969e6436e5538d6da4ab0e6ab7cc";
|
||||
assert_eq!(digest_to_string(hash(s.as_bytes())), correct_digest);
|
||||
|
|
Loading…
Reference in New Issue
Block a user