()
| 1189 | |
| 1190 | #[test] |
| 1191 | fn test_body_match_fraction() { |
| 1192 | let terms = search_terms("cargo clippy"); |
| 1193 | let body = "Workflow tip: cargo test is faster; run cargo clippy before pushing."; |
| 1194 | assert_eq!(body_match_fraction(&terms, body), 1.0); |
| 1195 | let half = search_terms("cargo missing"); |
| 1196 | assert_eq!(body_match_fraction(&half, body), 0.5); |
| 1197 | assert_eq!(body_match_fraction(&[], body), 0.0); |
| 1198 | } |
| 1199 | |
| 1200 | #[test] |
| 1201 | fn test_body_match_fraction_case_insensitive() { |
nothing calls this directly
no test coverage detected