mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-06 12:46:31 +00:00
chore(parse_query): delete println and move test inside tests module
This commit is contained in:
@ -380,7 +380,6 @@ mod tests {
|
|||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_unicode_typo_tolerance_fixed() -> Result<()> {
|
fn test_unicode_typo_tolerance_fixed() -> Result<()> {
|
||||||
@ -398,11 +397,6 @@ mod tests {
|
|||||||
let cyrillic_word = "собак";
|
let cyrillic_word = "собак";
|
||||||
let cyrillic_typos = nbr_typos(cyrillic_word);
|
let cyrillic_typos = nbr_typos(cyrillic_word);
|
||||||
|
|
||||||
eprintln!("ASCII '{}': char_count={}, typos={}",
|
|
||||||
ascii_word, ascii_word.chars().count(), ascii_typos);
|
|
||||||
eprintln!("Cyrillic '{}': char_count={}, typos={}",
|
|
||||||
cyrillic_word, cyrillic_word.chars().count(), cyrillic_typos);
|
|
||||||
|
|
||||||
// Both words have 5 characters, so they should have the same typo tolerance
|
// Both words have 5 characters, so they should have the same typo tolerance
|
||||||
assert_eq!(ascii_typos, cyrillic_typos,
|
assert_eq!(ascii_typos, cyrillic_typos,
|
||||||
"Words with same character count should get same typo tolerance");
|
"Words with same character count should get same typo tolerance");
|
||||||
@ -433,11 +427,10 @@ mod tests {
|
|||||||
|
|
||||||
for (word, script) in five_char_words {
|
for (word, script) in five_char_words {
|
||||||
let typos = nbr_typos(word);
|
let typos = nbr_typos(word);
|
||||||
eprintln!("{} '{}': chars={}, bytes={}, typos={}",
|
|
||||||
script, word, word.chars().count(), word.chars().count(), typos);
|
|
||||||
assert_eq!(typos, expected_typos,
|
assert_eq!(typos, expected_typos,
|
||||||
"{} word '{}' should get {} typo(s)", script, word, expected_typos);
|
"{} word '{}' should get {} typo(s)", script, word, expected_typos);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user