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

Function TestDiffMap_Get

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

GetMethod · 0.95
NewDiffMapFunction · 0.85

Tested by

no test coverage detected