(t *testing.T)
| 407 | } |
| 408 | |
| 409 | func TestFinalNudgeForToolResult(t *testing.T) { |
| 410 | tools := []official.Tool{ |
| 411 | {Type: "function", Function: official.ToolFunction{Name: "bash"}}, |
| 412 | } |
| 413 | msgs := []official.APIMessage{ |
| 414 | {Role: "user", Content: official.MessageContent{TextValue: "list"}}, |
| 415 | {Role: "assistant", Content: official.MessageContent{TextValue: ""}}, |
| 416 | {Role: "tool", Content: official.MessageContent{TextValue: "file1\nfile2"}}, |
| 417 | } |
| 418 | got := FinalNudge(tools, msgs) |
| 419 | if got == "" { |
| 420 | t.Fatalf("got empty nudge") |
| 421 | } |
| 422 | if !strings.Contains(got, "ground truth") { |
| 423 | t.Fatalf("missing ground-truth language: %s", got) |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | func TestFinalNudgeForUserTurn(t *testing.T) { |
| 428 | tools := []official.Tool{ |
nothing calls this directly
no test coverage detected