提交 8d2775e3 编写于 作者: F Fabio Berger 提交者: Péter Szilágyi

[release/1.4.6] core: Simplify bloom9 tests with available convenience method `TestBytes`

(cherry picked from commit faf66313)
上级 17003628
......@@ -39,12 +39,12 @@ func TestBloom(t *testing.T) {
}
for _, data := range positive {
if !bloom.Test(new(big.Int).SetBytes([]byte(data))) {
if !bloom.TestBytes([]byte(data)) {
t.Error("expected", data, "to test true")
}
}
for _, data := range negative {
if bloom.Test(new(big.Int).SetBytes([]byte(data))) {
if bloom.TestBytes([]byte(data)) {
t.Error("did not expect", data, "to test true")
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册