MCPcopy Create free account
hub / github.com/alibaba/open-code-review / TestDiffMap_Get

Function TestDiffMap_Get

internal/tool/file_read_diff_test.go:21–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestDiffMap_Get(t *testing.T) {
22 dm := NewDiffMap(map[string]string{"x.go": "content"})
23
24 v, ok := dm.Get("x.go")
25 if !ok || v != "content" {
26 t.Errorf("Get(x.go) = %q, %v; want 'content', true", v, ok)
27 }
28
29 _, ok = dm.Get("missing.go")
30 if ok {
31 t.Error("Get(missing.go) should return false")
32 }
33}
34
35func TestFileReadDiffProvider_Execute(t *testing.T) {
36 dm := NewDiffMap(map[string]string{

Callers

nothing calls this directly

Calls 2

GetMethod · 0.95
NewDiffMapFunction · 0.85

Tested by

no test coverage detected