(t *testing.T)
| 337 | } |
| 338 | |
| 339 | func TestHandleSubagentCall_MissingArgs(t *testing.T) { |
| 340 | p := &geminiPlannerAgent{} |
| 341 | fc := &genai.FunctionCall{ |
| 342 | Name: "test-subagent", |
| 343 | Args: map[string]any{}, |
| 344 | } |
| 345 | |
| 346 | err := p.handleSubagentCall(context.Background(), "test-conv", fc, nil, nil, nil, nil) |
| 347 | if err == nil { |
| 348 | t.Fatal("expected error due to missing arguments") |
| 349 | } |
| 350 | if !strings.Contains(err.Error(), "missing or invalid 'prompt' argument") { |
| 351 | t.Errorf("unexpected error: %v", err) |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | func TestHandleSubagentCall_Failure(t *testing.T) { |
| 356 | mockExec := &mockExecutor{ |
nothing calls this directly
no test coverage detected