(t *testing.T)
| 43 | } |
| 44 | |
| 45 | func 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 | } |