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