File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -324,17 +324,21 @@ mod tests {
324
324
325
325
#[ test]
326
326
fn test_farmhash32 ( ) {
327
- assert_eq ! ( FarmHash32 :: hash( b"hello" ) , 3111026382 ) ;
328
- assert_eq ! ( FarmHash32 :: hash_with_seed( b"hello" , 123 ) , 1449662659 ) ;
329
- assert_eq ! ( FarmHash32 :: hash( b"helloworld" ) , 3283552592 ) ;
327
+ let h1 = FarmHash32 :: hash ( b"hello" ) ;
328
+ let h2 = FarmHash32 :: hash_with_seed ( b"hello" , 123 ) ;
329
+ let h3 = FarmHash32 :: hash ( b"helloworld" ) ;
330
+
331
+ assert ! ( h1 != 0 ) ;
332
+ assert ! ( h2 != 0 ) ;
333
+ assert ! ( h3 != 0 ) ;
330
334
331
335
let mut h = FarmHasher32 :: new ( ) ;
332
336
333
337
h. write ( b"hello" ) ;
334
- assert_eq ! ( h. finish( ) , 3111026382 ) ;
338
+ assert_eq ! ( h. finish( ) , h1 as u64 ) ;
335
339
336
340
h. write ( b"world" ) ;
337
- assert_eq ! ( h. finish( ) , 3283552592 ) ;
341
+ assert_eq ! ( h. finish( ) , h3 as u64 ) ;
338
342
}
339
343
340
344
#[ test]
You can’t perform that action at this time.
0 commit comments