git-hulk commented on code in PR #3134:
URL: https://github.com/apache/kvrocks/pull/3134#discussion_r2295228592


##########
tests/gocase/unit/type/bitmap/bitmap_test.go:
##########
@@ -271,6 +271,17 @@ func TestBitmap(t *testing.T) {
                require.EqualValues(t, []string{"\x55\xff\x00\xaa"}, 
GetBitmap(t, rdb, ctx, "s"))
        })
 
+       t.Run("BITOP DIFF|DIFF1|ANDOR|ONE don't change the string with single 
input key", func(t *testing.T) {
+               Set2SetBit(t, rdb, ctx, "a", []byte("\x01\x02\xff"))
+               Set2SetBit(t, rdb, ctx, "b", []byte("\x01\x02\xff"))
+               Set2SetBit(t, rdb, ctx, "c", []byte("\x01\x02\xff"))
+               require.NoError(t, rdb.BitOpDiff(ctx, "res1", "a", "b", 
"c").Err())
+               require.NoError(t, rdb.BitOpDiff1(ctx, "res2", "a", "b", 
"c").Err())

Review Comment:
   For the `diff1`, the result bits should be set in one or more of `b` or `c`, 
but not  in `a`. So the result should be `\x00\x00\x00`? because a, b, c are 
the same.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to