diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2021-02-28 18:28:21 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2021-02-28 18:28:21 +0900 |
commit | bb0502ff4429580e363be708ff301c35479144e3 (patch) | |
tree | d2ec8db2becfdfa09d8d622786ddcfed0e0b2d2a /src/result_test.go | |
parent | c256442245836d959f329c10c4b2476a7f438ced (diff) |
Check gofmt in `make test`
Diffstat (limited to 'src/result_test.go')
-rw-r--r-- | src/result_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/result_test.go b/src/result_test.go index 1f3d338c..4084fdb7 100644 --- a/src/result_test.go +++ b/src/result_test.go @@ -18,8 +18,8 @@ func withIndex(i *Item, index int) *Item { func TestOffsetSort(t *testing.T) { offsets := []Offset{ - Offset{3, 5}, Offset{2, 7}, - Offset{1, 3}, Offset{2, 9}} + {3, 5}, {2, 7}, + {1, 3}, {2, 9}} sort.Sort(ByOrder(offsets)) if offsets[0][0] != 1 || offsets[0][1] != 3 || @@ -84,13 +84,13 @@ func TestResultRank(t *testing.T) { // Sort by relevance item3 := buildResult( - withIndex(&Item{}, 2), []Offset{Offset{1, 3}, Offset{5, 7}}, 3) + withIndex(&Item{}, 2), []Offset{{1, 3}, {5, 7}}, 3) item4 := buildResult( - withIndex(&Item{}, 2), []Offset{Offset{1, 2}, Offset{6, 7}}, 4) + withIndex(&Item{}, 2), []Offset{{1, 2}, {6, 7}}, 4) item5 := buildResult( - withIndex(&Item{}, 2), []Offset{Offset{1, 3}, Offset{5, 7}}, 5) + withIndex(&Item{}, 2), []Offset{{1, 3}, {5, 7}}, 5) item6 := buildResult( - withIndex(&Item{}, 2), []Offset{Offset{1, 2}, Offset{6, 7}}, 6) + withIndex(&Item{}, 2), []Offset{{1, 2}, {6, 7}}, 6) items = []Result{item1, item2, item3, item4, item5, item6} sort.Sort(ByRelevance(items)) if !(items[0] == item6 && items[1] == item5 && |