mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
whisper: fix gosimple
This commit is contained in:
parent
faa510618e
commit
dfffdb8685
2 changed files with 16 additions and 8 deletions
|
|
@ -813,7 +813,8 @@ func TestVariableTopics(t *testing.T) {
|
||||||
func TestMatchSingleTopic_ReturnTrue(t *testing.T) {
|
func TestMatchSingleTopic_ReturnTrue(t *testing.T) {
|
||||||
bt := []byte("test")
|
bt := []byte("test")
|
||||||
topic := BytesToTopic(bt)
|
topic := BytesToTopic(bt)
|
||||||
if matchSingleTopic(topic, bt) == false {
|
|
||||||
|
if !matchSingleTopic(topic, bt) {
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -821,7 +822,8 @@ func TestMatchSingleTopic_ReturnTrue(t *testing.T) {
|
||||||
func TestMatchSingleTopic_WithTail_ReturnTrue(t *testing.T) {
|
func TestMatchSingleTopic_WithTail_ReturnTrue(t *testing.T) {
|
||||||
bt := []byte("test with tail")
|
bt := []byte("test with tail")
|
||||||
topic := BytesToTopic([]byte("test"))
|
topic := BytesToTopic([]byte("test"))
|
||||||
if matchSingleTopic(topic, bt) == false {
|
|
||||||
|
if !matchSingleTopic(topic, bt) {
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -829,7 +831,8 @@ func TestMatchSingleTopic_WithTail_ReturnTrue(t *testing.T) {
|
||||||
func TestMatchSingleTopic_NotEquals_ReturnFalse(t *testing.T) {
|
func TestMatchSingleTopic_NotEquals_ReturnFalse(t *testing.T) {
|
||||||
bt := []byte("tes")
|
bt := []byte("tes")
|
||||||
topic := BytesToTopic(bt)
|
topic := BytesToTopic(bt)
|
||||||
if matchSingleTopic(topic, bt) == true {
|
|
||||||
|
if matchSingleTopic(topic, bt) {
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -837,7 +840,8 @@ func TestMatchSingleTopic_NotEquals_ReturnFalse(t *testing.T) {
|
||||||
func TestMatchSingleTopic_InsufficientLength_ReturnFalse(t *testing.T) {
|
func TestMatchSingleTopic_InsufficientLength_ReturnFalse(t *testing.T) {
|
||||||
bt := []byte("test")
|
bt := []byte("test")
|
||||||
topic := BytesToTopic([]byte("not_equal"))
|
topic := BytesToTopic([]byte("not_equal"))
|
||||||
if matchSingleTopic(topic, bt) == true {
|
|
||||||
|
if matchSingleTopic(topic, bt) {
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -837,7 +837,8 @@ func TestVariableTopics(t *testing.T) {
|
||||||
func TestMatchSingleTopic_ReturnTrue(t *testing.T) {
|
func TestMatchSingleTopic_ReturnTrue(t *testing.T) {
|
||||||
bt := []byte("test")
|
bt := []byte("test")
|
||||||
topic := BytesToTopic(bt)
|
topic := BytesToTopic(bt)
|
||||||
if matchSingleTopic(topic, bt) == false {
|
|
||||||
|
if !matchSingleTopic(topic, bt) {
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -845,7 +846,8 @@ func TestMatchSingleTopic_ReturnTrue(t *testing.T) {
|
||||||
func TestMatchSingleTopic_WithTail_ReturnTrue(t *testing.T) {
|
func TestMatchSingleTopic_WithTail_ReturnTrue(t *testing.T) {
|
||||||
bt := []byte("test with tail")
|
bt := []byte("test with tail")
|
||||||
topic := BytesToTopic([]byte("test"))
|
topic := BytesToTopic([]byte("test"))
|
||||||
if matchSingleTopic(topic, bt) == false {
|
|
||||||
|
if !matchSingleTopic(topic, bt) {
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -853,7 +855,8 @@ func TestMatchSingleTopic_WithTail_ReturnTrue(t *testing.T) {
|
||||||
func TestMatchSingleTopic_NotEquals_ReturnFalse(t *testing.T) {
|
func TestMatchSingleTopic_NotEquals_ReturnFalse(t *testing.T) {
|
||||||
bt := []byte("tes")
|
bt := []byte("tes")
|
||||||
topic := BytesToTopic(bt)
|
topic := BytesToTopic(bt)
|
||||||
if matchSingleTopic(topic, bt) == true {
|
|
||||||
|
if matchSingleTopic(topic, bt) {
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -861,7 +864,8 @@ func TestMatchSingleTopic_NotEquals_ReturnFalse(t *testing.T) {
|
||||||
func TestMatchSingleTopic_InsufficientLength_ReturnFalse(t *testing.T) {
|
func TestMatchSingleTopic_InsufficientLength_ReturnFalse(t *testing.T) {
|
||||||
bt := []byte("test")
|
bt := []byte("test")
|
||||||
topic := BytesToTopic([]byte("not_equal"))
|
topic := BytesToTopic([]byte("not_equal"))
|
||||||
if matchSingleTopic(topic, bt) == true {
|
|
||||||
|
if matchSingleTopic(topic, bt) {
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue