MCPcopy
hub / github.com/MadAppGang/dingo / TestSourceMapCacheGetMissing

Function TestSourceMapCacheGetMissing

pkg/lsp/sourcemap_cache_test.go:125–137  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

123}
124
125func TestSourceMapCacheGetMissing(t *testing.T) {
126 logger := &testLogger{}
127 cache, err := NewSourceMapCache(logger)
128 if err != nil {
129 t.Fatalf("NewSourceMapCache failed: %v", err)
130 }
131
132 // Try to get a non-existent source map
133 _, err = cache.Get("/nonexistent/path/file.go")
134 if err == nil {
135 t.Error("Expected error for non-existent file")
136 }
137}
138
139func TestSourceMapCacheGetSuccess(t *testing.T) {
140 workspaceRoot, cleanup := setupTestWorkspace(t)

Callers

nothing calls this directly

Calls 4

GetMethod · 0.95
NewSourceMapCacheFunction · 0.85
FatalfMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected