From 0558dfee795c297abef27a3abaa232c73d8a042d Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 16 Aug 2017 12:26:06 +0900 Subject: Remove count field from ChunkList --- src/chunklist_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/chunklist_test.go') diff --git a/src/chunklist_test.go b/src/chunklist_test.go index c8d33a67..6c1d09eb 100644 --- a/src/chunklist_test.go +++ b/src/chunklist_test.go @@ -11,9 +11,8 @@ func TestChunkList(t *testing.T) { // FIXME global sortCriteria = []criterion{byScore, byLength} - cl := NewChunkList(func(item *Item, s []byte, i int) bool { + cl := NewChunkList(func(item *Item, s []byte) bool { item.text = util.ToChars(s) - item.text.Index = int32(i * 2) return true }) @@ -44,9 +43,7 @@ func TestChunkList(t *testing.T) { t.Error("Snapshot should contain only two items") } if chunk1.items[0].text.ToString() != "hello" || - chunk1.items[0].Index() != 0 || - chunk1.items[1].text.ToString() != "world" || - chunk1.items[1].Index() != 2 { + chunk1.items[1].text.ToString() != "world" { t.Error("Invalid data") } if chunk1.IsFull() { -- cgit v1.2.3