From 6b4805ca1a1b0758363d1bb8c4c996730e19dc5a Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 26 Aug 2017 21:58:18 +0900 Subject: Optimize rank comparison on x86 (little-endian) --- src/result_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/result_test.go') diff --git a/src/result_test.go b/src/result_test.go index 1d86b1d3..afd17307 100644 --- a/src/result_test.go +++ b/src/result_test.go @@ -59,10 +59,10 @@ func TestResultRank(t *testing.T) { strs := [][]rune{[]rune("foo"), []rune("foobar"), []rune("bar"), []rune("baz")} item1 := buildResult( withIndex(&Item{text: util.RunesToChars(strs[0])}, 1), []Offset{}, 2) - if item1.points[0] != math.MaxUint16-2 || // Bonus - item1.points[1] != 3 || // Length - item1.points[2] != 0 || // Unused - item1.points[3] != 0 || // Unused + if item1.points[3] != math.MaxUint16-2 || // Bonus + item1.points[2] != 3 || // Length + item1.points[1] != 0 || // Unused + item1.points[0] != 0 || // Unused item1.item.Index() != 1 { t.Error(item1) } -- cgit v1.2.3