Skip to content

Commit

Permalink
Added UT
Browse files Browse the repository at this point in the history
  • Loading branch information
jainbhavya53 committed Sep 25, 2024
1 parent c4cc244 commit 984c773
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions integration_tests/commands/async/bit_operation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,36 @@ func TestBitPos(t *testing.T) {
out interface{}
setCmdSETBIT bool
}{
{
name: "String interval BIT 0,-1 ",
val: "\\x00\\xff\\x00",
inCmd: "BITPOS testkey 0 0 -1 bit",
out: int64(0),
},
{
name: "String interval BIT 8,-1",
val: "\\x00\\xff\\x00",
inCmd: "BITPOS testkey 0 8 -1 bit",
out: int64(8),
},
{
name: "String interval BIT 16,-1",
val: "\\x00\\xff\\x00",
inCmd: "BITPOS testkey 0 16 -1 bit",
out: int64(16),
},
{
name: "String interval BIT 16,200",
val: "\\x00\\xff\\x00",
inCmd: "BITPOS testkey 0 16 200 bit",
out: int64(16),
},
{
name: "String interval BIT 8,8",
val: "\\x00\\xff\\x00",
inCmd: "BITPOS testkey 0 8 8 bit",
out: int64(8),
},
{
name: "FindsFirstZeroBit",
val: "\xff\xf0\x00",
Expand Down

0 comments on commit 984c773

Please sign in to comment.