()
| 1149 | |
| 1150 | #[test] |
| 1151 | fn test_body_match_fraction() { |
| 1152 | let terms = search_terms("cargo clippy"); |
| 1153 | let body = "Workflow tip: cargo test is faster; run cargo clippy before pushing."; |
| 1154 | assert_eq!(body_match_fraction(&terms, body), 1.0); |
| 1155 | let half = search_terms("cargo missing"); |
| 1156 | assert_eq!(body_match_fraction(&half, body), 0.5); |
| 1157 | assert_eq!(body_match_fraction(&[], body), 0.0); |
| 1158 | } |
| 1159 | |
| 1160 | #[test] |
| 1161 | fn test_body_match_fraction_case_insensitive() { |
nothing calls this directly
no test coverage detected