MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_context_result_add_item

Function test_context_result_add_item

core/src/context/mod.rs:625–632  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

623
624 #[test]
625 fn test_context_result_add_item() {
626 let mut result = ContextResult::new("provider");
627 let item = ContextItem::new("id", ContextType::Resource, "content").with_token_count(100);
628 result.add_item(item);
629
630 assert_eq!(result.items.len(), 1);
631 assert_eq!(result.total_tokens, 100);
632 }
633
634 #[test]
635 fn test_context_result_add_multiple_items() {

Callers

nothing calls this directly

Calls 2

with_token_countMethod · 0.80
add_itemMethod · 0.80

Tested by

no test coverage detected