fix minor score bugs in tests

spotted by github.com/gordonklaus/ineffassign
This commit is contained in:
Harmen 2015-06-02 10:33:47 +02:00
parent 369a529586
commit 83df95b6bf
4 changed files with 4 additions and 2 deletions

View File

@ -88,4 +88,5 @@ func TestQuit(t *testing.T) {
v, err = redis.String(c.Do("PING"))
assert(t, err != nil, "QUIT closed the client")
equals(t, "", v)
}

View File

@ -855,6 +855,7 @@ func TestSetrange(t *testing.T) {
_, err = redis.Int(c.Do("SETRANGE", "key", -1, ""))
assert(t, err != nil, "do SETRANGE error")
_, err = redis.Int(c.Do("SETRANGE", "many", 12, "keys", "here"))
assert(t, err != nil, "do SETRANGE error")
}
}

View File

@ -59,7 +59,7 @@ func TestWatch(t *testing.T) {
{
_, err = redis.String(c.Do("MULTI"))
ok(t, err)
r, err = redis.String(c.Do("WATCH", "foo"))
_, err = redis.String(c.Do("WATCH", "foo"))
assert(t, err != nil, "do WATCH error")
}
}

View File

@ -47,7 +47,7 @@ func TestSortedSetImpl(t *testing.T) {
assert(t, found, "Found 3pi")
equals(t, 2, rank)
rank, found = s.rankByScore("nosuch", asc)
_, found = s.rankByScore("nosuch", asc)
assert(t, !found, "Did not find nosuch")
}
}