mirror of
https://github.com/alicebob/miniredis.git
synced 2024-07-21 14:03:53 +08:00
fix minor score bugs in tests
spotted by github.com/gordonklaus/ineffassign
This commit is contained in:
parent
369a529586
commit
83df95b6bf
@ -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)
|
||||
}
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user