(t *testing.T)
| 35 | } |
| 36 | |
| 37 | func TestNewHandler_EmptyArguments(t *testing.T) { |
| 38 | t.Parallel() |
| 39 | |
| 40 | handler := NewHandler(func(_ context.Context, _ map[string]any) (*ToolCallResult, error) { |
| 41 | return ResultSuccess("ok"), nil |
| 42 | }) |
| 43 | |
| 44 | result, err := handler(t.Context(), ToolCall{ |
| 45 | ID: "call_1", |
| 46 | Type: "function", |
| 47 | Function: FunctionCall{ |
| 48 | Name: "get_memories", |
| 49 | Arguments: "", |
| 50 | }, |
| 51 | }) |
| 52 | require.NoError(t, err) |
| 53 | assert.Equal(t, "ok", result.Output) |
| 54 | } |
| 55 | |
| 56 | func TestNewHandler_EmptyObjectArguments(t *testing.T) { |
| 57 | t.Parallel() |
nothing calls this directly
no test coverage detected