Skip to content

Commit 3494c29

Browse files
committed
Fix AVX scanner exact-match test threshold
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 01071e57-12fd-4f42-bc67-e2b274d0b007
1 parent 62c8a7e commit 3494c29

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/x86_simd.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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))

0 commit comments

Comments
 (0)