summaryrefslogtreecommitdiffstats
path: root/src/result_test.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-08-26 21:58:18 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-08-27 01:46:11 +0900
commit6b4805ca1a1b0758363d1bb8c4c996730e19dc5a (patch)
tree14780508e5273c86ced515d7a806de3bfa71ed24 /src/result_test.go
parent159699b5d7505b132d2299690d7bf9f79d5fbda4 (diff)
Optimize rank comparison on x86 (little-endian)
Diffstat (limited to 'src/result_test.go')
-rw-r--r--src/result_test.go8
1 files changed, 4 insertions, 4 deletions
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)
}