(t *testing.T)
| 164 | } |
| 165 | |
| 166 | func TestSearchSnapshot_DeletedDocsExcluded(t *testing.T) { |
| 167 | t.Parallel() |
| 168 | idx := filefinder.NewIndex() |
| 169 | idx.Add("handler.go", 0) |
| 170 | idx.Remove("handler.go") |
| 171 | snap := idx.Snapshot() |
| 172 | cands := filefinder.SearchSnapshotForTest(filefinder.NewQueryPlanForTest("handler"), snap, 100) |
| 173 | for _, c := range cands { |
| 174 | if c.Path == "handler.go" { |
| 175 | t.Error("deleted doc should not appear in results") |
| 176 | } |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | func TestSearchSnapshot_Limit(t *testing.T) { |
| 181 | t.Parallel() |