Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshi-099 committed Nov 1, 2023
1 parent 7bf4a0f commit 3e6d6ed
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rotom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,14 @@ func TestSet(t *testing.T) {

for i := 0; i < 1000; i++ {
assert.Nil(cli.SAdd("set", strconv.Itoa(i)))
}

for i := 200; i < 1200; i++ {
ok, err := cli.SHas("set", strconv.Itoa(i))
assert.Nil(err)
assert.Equal(ok, i < 1000, i)
assert.True(ok)

ok, err = cli.SHas("set", "none")
assert.Nil(err)
assert.False(ok)
}
}

Expand Down

0 comments on commit 3e6d6ed

Please sign in to comment.