1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 19:01:34 +08:00

test: Bloom filter, basic filter test

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
Jakub Sztandera
2016-12-07 08:23:59 +01:00
parent 24d35f3c66
commit cc61e5bb1a

View File

@ -6,6 +6,14 @@ import (
"testing" "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) { func TestFilter(t *testing.T) {
f := NewFilter(128) f := NewFilter(128)