MCPcopy Index your code
hub / github.com/coder/coder / TestSearchSnapshot_Limit

Function TestSearchSnapshot_Limit

agent/filefinder/query_test.go:180–191  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

178}
179
180func TestSearchSnapshot_Limit(t *testing.T) {
181 t.Parallel()
182 paths := make([]string, 50)
183 for i := range paths {
184 paths[i] = "handler" + string(rune('a'+i%26)) + ".go"
185 }
186 snap := filefinder.MakeTestSnapshot(paths)
187 cands := filefinder.SearchSnapshotForTest(filefinder.NewQueryPlanForTest("handler"), snap, 3)
188 if len(cands) > 3 {
189 t.Errorf("expected at most 3 candidates, got %d", len(cands))
190 }
191}
192
193func TestIntersectSorted(t *testing.T) {
194 t.Parallel()

Callers

nothing calls this directly

Calls 2

MakeTestSnapshotFunction · 0.92
ErrorfMethod · 0.45

Tested by

no test coverage detected