2014-10-29 21:16:18 +02:00
|
|
|
package ethchain
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/vm"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestBloom9(t *testing.T) {
|
|
|
|
testCase := []byte("testtest")
|
2014-10-29 21:33:25 +02:00
|
|
|
bin := LogsBloom([]vm.Log{vm.Log{testCase, [][]byte{[]byte("hellohello")}, nil}}).Bytes()
|
2014-10-29 21:16:18 +02:00
|
|
|
res := BloomLookup(bin, testCase)
|
|
|
|
|
|
|
|
if !res {
|
|
|
|
t.Errorf("Bloom lookup failed")
|
|
|
|
}
|
|
|
|
}
|