@cryptotaxi247 / kubo / commits / cc61e5bb1

test: Bloom filter, basic filter test

License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

Jakub Sztandera committed Dec 7, 2016 at 08:23 UTC cc61e5bb1a6823f765212942ee01e7b034ba7698
1 file changed +8
blocks/bloom/filter_test.go
+8
@@ -6,6 +6,14 @@ import (
6 "testing"
7 )
8
9 +func TestBasicFilter(t *testing.T) {
10 + f := BasicFilter().(*filter)
11 +
12 + if len(f.filter) != 2048 {
13 + t.Fatal("basic filter should have length 2048, has:", len(f.filter))
14 + }
15 +}
16 +
17 func TestFilter(t *testing.T) {
18 f := NewFilter(128)
19