Commit 889a3bb4 authored by Marc Gravell's avatar Marc Gravell

fix off-by-one in the SPOP test

parent 4315daa4
......@@ -75,7 +75,7 @@ public void SetPopMulti_Multi()
var random = db.SetPop(key);
Assert.False(random.IsNull);
Assert.True((int)random > 0);
Assert.True((int)random < 10);
Assert.True((int)random <= 10);
Assert.Equal(9, db.SetLength(key));
var moreRandoms = db.SetPop(key, 2);
......@@ -101,7 +101,7 @@ public void SetPopMulti_Single()
var random = db.SetPop(key);
Assert.False(random.IsNull);
Assert.True((int)random > 0);
Assert.True((int)random < 10);
Assert.True((int)random <= 10);
Assert.Equal(9, db.SetLength(key));
var moreRandoms = db.SetPop(key, 1);
......@@ -130,7 +130,7 @@ public async Task SetPopMulti_Multi_Async()
var random = await db.SetPopAsync(key).ForAwait();
Assert.False(random.IsNull);
Assert.True((int)random > 0);
Assert.True((int)random < 10);
Assert.True((int)random <= 10);
Assert.Equal(9, db.SetLength(key));
var moreRandoms = await db.SetPopAsync(key, 2).ForAwait();
......@@ -157,7 +157,7 @@ public async Task SetPopMulti_Single_Async()
var random = await db.SetPopAsync(key).ForAwait();
Assert.False(random.IsNull);
Assert.True((int)random > 0);
Assert.True((int)random < 10);
Assert.True((int)random <= 10);
Assert.Equal(9, db.SetLength(key));
var moreRandoms = db.SetPop(key, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment