(t *testing.T)
| 173 | } |
| 174 | |
| 175 | func TestReLocateComment_NilTask(t *testing.T) { |
| 176 | cm := model.LlmComment{ |
| 177 | Path: "main.go", |
| 178 | Content: "test", |
| 179 | ExistingCode: "bad code", |
| 180 | } |
| 181 | d := makeDiff() |
| 182 | client := &mockLLMClient{} |
| 183 | |
| 184 | ok, resp, msgs := ReLocateComment(context.Background(), &cm, d, client, nil, "test-model", 1000) |
| 185 | if ok { |
| 186 | t.Fatal("expected false when task is nil") |
| 187 | } |
| 188 | if resp != nil { |
| 189 | t.Fatal("expected nil response when task is nil") |
| 190 | } |
| 191 | if msgs != nil { |
| 192 | t.Fatal("expected nil messages when task is nil") |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | func TestExtractCodeBlock(t *testing.T) { |
| 197 | tests := []struct { |
nothing calls this directly
no test coverage detected