--- helpers ---
(t *testing.T, path string, entries []db.DLLMatch)
| 314 | // --- helpers --- |
| 315 | |
| 316 | func writeDLLMatchJSONL(t *testing.T, path string, entries []db.DLLMatch) { |
| 317 | t.Helper() |
| 318 | f, err := os.Create(path) |
| 319 | if err != nil { |
| 320 | t.Fatal(err) |
| 321 | } |
| 322 | defer f.Close() |
| 323 | enc := json.NewEncoder(f) |
| 324 | for _, e := range entries { |
| 325 | if err := enc.Encode(e); err != nil { |
| 326 | t.Fatal(err) |
| 327 | } |
| 328 | } |
| 329 | } |
no test coverage detected