MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestToolResult_ValidMap

Function TestToolResult_ValidMap

pkg/mcp/tools_internal_test.go:341–349  ·  view source on GitHub ↗

--- toolResult ---

(t *testing.T)

Source from the content-addressed store, hash-verified

339// --- toolResult ---
340
341func TestToolResult_ValidMap(t *testing.T) {
342 res, err := toolResult(map[string]any{"key": "value"})
343 if err != nil {
344 t.Fatalf("unexpected error: %v", err)
345 }
346 if res == nil {
347 t.Fatal("expected non-nil result")
348 }
349}
350
351func TestToolResult_MarshalError(t *testing.T) {
352 _, err := toolResult(map[string]any{"bad": make(chan int)})

Callers

nothing calls this directly

Calls 2

toolResultFunction · 0.85
FatalfMethod · 0.65

Tested by

no test coverage detected