forked from RoaringBitmap/roaring
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request RoaringBitmap#384 from anacrolix/clean-bsi-streaming
Add BSI WriteTo, ReadFrom and Equal
- Loading branch information
Showing
3 changed files
with
231 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//go:build go1.18 | ||
// +build go1.18 | ||
|
||
package roaring64 | ||
|
||
import "testing" | ||
|
||
func FuzzBsiStreaming(f *testing.F) { | ||
f.Fuzz(func(t *testing.T, b []byte) { | ||
slice, err := bytesToBsiColValPairs(b) | ||
if err != nil { | ||
t.SkipNow() | ||
} | ||
cols := make(map[uint64]struct{}, len(slice)) | ||
for _, pair := range slice { | ||
_, ok := cols[pair.col] | ||
if ok { | ||
t.Skip("duplicate column") | ||
} | ||
cols[pair.col] = struct{}{} | ||
} | ||
testBsiRoundTrip(t, slice) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters