File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1997,8 +1997,8 @@ mod tests {
19971997 }
19981998
19991999 // `best` must return the lowest index among ties and short-circuit on
2000- // an exact match (distance == 0). Include a first-record exact match
2001- // followed by later exact matches to guarantee both conditions.
2000+ // an exact match (distance == 0). Include several exact matches to
2001+ // guarantee both conditions.
20022002 #[ test]
20032003 fn avx512_scanner_best_preserves_lowest_index_tie ( ) {
20042004 if !avx512_scanner_hw_available ( ) {
@@ -2016,7 +2016,7 @@ mod tests {
20162016 big[ i * width..( i + 1 ) * width] . copy_from_slice ( & small) ;
20172017 big[ i * width] ^= 0x01 ;
20182018 }
2019- assert_eq ! ( unsafe { array_first_avx512_16( & big, & small, - 1 ) } , Some ( 3 ) ) ;
2019+ assert_eq ! ( unsafe { array_first_avx512_16( & big, & small, 0 ) } , Some ( 3 ) ) ;
20202020 assert_eq ! (
20212021 unsafe { array_best_avx512_16( & big, & small, -1 ) } ,
20222022 Some ( ( 0 , 3 ) )
You can’t perform that action at this time.
0 commit comments