MCPcopy
hub / github.com/kopia/kopia / TestEntriesSort

Function TestEntriesSort

fs/entry_test.go:45–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestEntriesSort(t *testing.T) {
46 entries := []Entry{
47 testEntry{n: "cc"},
48 testEntry{n: "bb"},
49 testEntry{n: "aa"},
50 }
51
52 Sort(entries)
53
54 want := []Entry{
55 testEntry{n: "aa"},
56 testEntry{n: "bb"},
57 testEntry{n: "cc"},
58 }
59
60 if diff := pretty.Compare(entries, want); diff != "" {
61 t.Errorf("unexpected output diff (-got, +want): %v", diff)
62 }
63}

Callers

nothing calls this directly

Calls 3

SortFunction · 0.85
ErrorfMethod · 0.80
CompareMethod · 0.45

Tested by

no test coverage detected