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

Function test_tool_result_to_string

core/src/mcp/manager.rs:483–499  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

481
482 #[test]
483 fn test_tool_result_to_string() {
484 let result = CallToolResult {
485 content: vec![
486 ToolContent::Text {
487 text: "Line 1".to_string(),
488 },
489 ToolContent::Text {
490 text: "Line 2".to_string(),
491 },
492 ],
493 is_error: false,
494 };
495
496 let output = tool_result_to_string(&result);
497 assert!(output.contains("Line 1"));
498 assert!(output.contains("Line 2"));
499 }
500
501 #[tokio::test]
502 async fn test_mcp_manager_new() {

Callers

nothing calls this directly

Calls 1

tool_result_to_stringFunction · 0.85

Tested by

no test coverage detected