Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
test(core): add test to ensure `spell_out_numbers` keeps its promises
Elijah Potter9543b064fc78
diff --git a/harper-core/src/linting/spelled_numbers.rs b/harper-core/src/linting/spelled_numbers.rsindex aa80a0ba7..e9fc5fd70 100644--- a/harper-core/src/linting/spelled_numbers.rs+++ b/harper-core/src/linting/spelled_numbers.rs@@ -121,4 +121,12 @@ mod tests {fn does_not_correct_ten() {assert_suggestion_result("There are 10 pigs.", SpelledNumbers, "There are 10 pigs.");}++ /// Check that the algorithm won't stack overflow or return `None` for any numbers within the specified range.+ #[test]+ fn services_range() {+ for i in 0..1000 {+ spell_out_number(i).unwrap();+ }+ }}