Paths are reported sorted so a message built from them is stable.
(t *testing.T)
| 45 | |
| 46 | // Paths are reported sorted so a message built from them is stable. |
| 47 | func TestDiffMapPathsSorted(t *testing.T) { |
| 48 | dm := NewDiffMap(map[string]string{"c.go": "", "a.go": "", "b.go": ""}) |
| 49 | got := strings.Join(dm.Paths(), ",") |
| 50 | if got != "a.go,b.go,c.go" { |
| 51 | t.Fatalf("Paths() = %q, want sorted", got) |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | // A path that holds an empty diff is still a path the message can offer. |
| 56 | func TestDiffMapPathsKeepsEmptyDiff(t *testing.T) { |
nothing calls this directly
no test coverage detected