middleware: fix test for pointer type Text field
This commit is contained in:
parent
fa42204da8
commit
9c27c72952
|
|
@ -472,8 +472,8 @@ func TestAnthropicWriter_NonStreaming(t *testing.T) {
|
||||||
if len(result.Content) != 1 {
|
if len(result.Content) != 1 {
|
||||||
t.Fatalf("expected 1 content block, got %d", len(result.Content))
|
t.Fatalf("expected 1 content block, got %d", len(result.Content))
|
||||||
}
|
}
|
||||||
if result.Content[0].Text != "Hello there!" {
|
if result.Content[0].Text == nil || *result.Content[0].Text != "Hello there!" {
|
||||||
t.Errorf("expected text 'Hello there!', got %q", result.Content[0].Text)
|
t.Errorf("expected text 'Hello there!', got %v", result.Content[0].Text)
|
||||||
}
|
}
|
||||||
if result.StopReason != "end_turn" {
|
if result.StopReason != "end_turn" {
|
||||||
t.Errorf("expected stop_reason 'end_turn', got %q", result.StopReason)
|
t.Errorf("expected stop_reason 'end_turn', got %q", result.StopReason)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue