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

Function TestDiffMapPathsKeepsEmptyDiff

internal/tool/diffmap_test.go:56–61  ·  view source on GitHub ↗

A path that holds an empty diff is still a path the message can offer.

(t *testing.T)

Source from the content-addressed store, hash-verified

54
55// A path that holds an empty diff is still a path the message can offer.
56func TestDiffMapPathsKeepsEmptyDiff(t *testing.T) {
57 dm := NewDiffMap(map[string]string{"empty.go": ""})
58 if _, ok := dm.Get("empty.go"); !ok {
59 t.Fatalf("an empty diff is still a present path; paths: %v", dm.Paths())
60 }
61}

Callers

nothing calls this directly

Calls 3

GetMethod · 0.95
PathsMethod · 0.95
NewDiffMapFunction · 0.85

Tested by

no test coverage detected