MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_body_match_fraction

Function test_body_match_fraction

atomic-cli/src/commands/vault/context.rs:1019–1026  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1017
1018 #[test]
1019 fn test_body_match_fraction() {
1020 let terms = search_terms("cargo clippy");
1021 let body = "Workflow tip: cargo test is faster; run cargo clippy before pushing.";
1022 assert_eq!(body_match_fraction(&terms, body), 1.0);
1023 let half = search_terms("cargo missing");
1024 assert_eq!(body_match_fraction(&half, body), 0.5);
1025 assert_eq!(body_match_fraction(&[], body), 0.0);
1026 }
1027
1028 #[test]
1029 fn test_body_match_fraction_case_insensitive() {

Callers

nothing calls this directly

Calls 1

search_termsFunction · 0.85

Tested by

no test coverage detected