summaryrefslogtreecommitdiffstats
path: root/src/chunklist_test.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-01-13 21:36:44 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-01-14 01:12:49 +0900
commit8d3a302a1754a4e28cc1085b95e9a03981372d02 (patch)
treea5b95363609d3acebda69890fd6b7b59b18f9c02 /src/chunklist_test.go
parent1d2d32c847e39818bedae5f86ca75e6b70b60444 (diff)
Simplify Item structure
This commit compensates for the performance overhead from the extended tiebreak option.
Diffstat (limited to 'src/chunklist_test.go')
-rw-r--r--src/chunklist_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/chunklist_test.go b/src/chunklist_test.go
index 6ddd336f..5f7481df 100644
--- a/src/chunklist_test.go
+++ b/src/chunklist_test.go
@@ -7,7 +7,7 @@ import (
func TestChunkList(t *testing.T) {
// FIXME global
- sortCriteria = []criterion{byMatchLen, byLength, byIndex}
+ sortCriteria = []criterion{byMatchLen, byLength}
cl := NewChunkList(func(s []byte, i int) *Item {
return &Item{text: []rune(string(s)), rank: buildEmptyRank(int32(i * 2))}
@@ -39,7 +39,7 @@ func TestChunkList(t *testing.T) {
if len(*chunk1) != 2 {
t.Error("Snapshot should contain only two items")
}
- last := func(arr []int32) int32 {
+ last := func(arr [5]int32) int32 {
return arr[len(arr)-1]
}
if string((*chunk1)[0].text) != "hello" || last((*chunk1)[0].rank) != 0 ||