MCPcopy Create free account
hub / github.com/diillson/chatcli / TestVectorIndex_NilIsSafe

Function TestVectorIndex_NilIsSafe

cli/workspace/memory/vector_store_test.go:40–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

38}
39
40func TestVectorIndex_NilIsSafe(t *testing.T) {
41 var v *VectorIndex
42 if v.Enabled() {
43 t.Error("nil index must report not enabled")
44 }
45 if v.Count() != 0 {
46 t.Error("nil index must count 0")
47 }
48 if got := v.MissingFor([]string{"x"}); got != nil {
49 t.Errorf("nil index MissingFor must be nil; got %v", got)
50 }
51}
52
53func TestVectorIndex_NullProviderDisablesAll(t *testing.T) {
54 dir := t.TempDir()

Callers

nothing calls this directly

Calls 5

EnabledMethod · 0.95
CountMethod · 0.95
MissingForMethod · 0.95
ErrorfMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected