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

Function test_build_context_string

atomic-repository/src/ai/mod.rs:602–614  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

600
601 #[test]
602 fn test_build_context_string() {
603 let nodes = vec![
604 KgNode::new("change:abc", "change", "abc123", "graph").with_summary("Fix auth bug"),
605 KgNode::new("file:src/auth.rs", "file", "src/auth.rs", "graph"),
606 ];
607 let edges = vec![KgEdge::new("change:abc", "file:src/auth.rs", "MODIFIES")];
608
609 let context = build_context_string(&nodes, &edges, "who fixed auth?");
610 assert!(context.contains("abc123"));
611 assert!(context.contains("Fix auth bug"));
612 assert!(context.contains("MODIFIES"));
613 assert!(context.contains("who fixed auth?"));
614 }
615
616 #[test]
617 fn test_build_context_string_empty() {

Callers

nothing calls this directly

Calls 1

build_context_stringFunction · 0.85

Tested by

no test coverage detected