mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 19:24:14 +08:00
test: Bloom filter, basic filter test
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
@ -6,6 +6,14 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestBasicFilter(t *testing.T) {
|
||||
f := BasicFilter().(*filter)
|
||||
|
||||
if len(f.filter) != 2048 {
|
||||
t.Fatal("basic filter should have length 2048, has:", len(f.filter))
|
||||
}
|
||||
}
|
||||
|
||||
func TestFilter(t *testing.T) {
|
||||
f := NewFilter(128)
|
||||
|
||||
|
Reference in New Issue
Block a user