From dfffdb868561be7fdef578380f4fcee797cdc2ce Mon Sep 17 00:00:00 2001 From: b00ris Date: Thu, 11 Jan 2018 15:14:12 +0300 Subject: [PATCH] whisper: fix gosimple --- whisper/whisperv5/filter_test.go | 12 ++++++++---- whisper/whisperv6/filter_test.go | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/whisper/whisperv5/filter_test.go b/whisper/whisperv5/filter_test.go index 26d09e1060..ca22920beb 100644 --- a/whisper/whisperv5/filter_test.go +++ b/whisper/whisperv5/filter_test.go @@ -813,7 +813,8 @@ func TestVariableTopics(t *testing.T) { func TestMatchSingleTopic_ReturnTrue(t *testing.T) { bt := []byte("test") topic := BytesToTopic(bt) - if matchSingleTopic(topic, bt) == false { + + if !matchSingleTopic(topic, bt) { t.FailNow() } } @@ -821,7 +822,8 @@ func TestMatchSingleTopic_ReturnTrue(t *testing.T) { func TestMatchSingleTopic_WithTail_ReturnTrue(t *testing.T) { bt := []byte("test with tail") topic := BytesToTopic([]byte("test")) - if matchSingleTopic(topic, bt) == false { + + if !matchSingleTopic(topic, bt) { t.FailNow() } } @@ -829,7 +831,8 @@ func TestMatchSingleTopic_WithTail_ReturnTrue(t *testing.T) { func TestMatchSingleTopic_NotEquals_ReturnFalse(t *testing.T) { bt := []byte("tes") topic := BytesToTopic(bt) - if matchSingleTopic(topic, bt) == true { + + if matchSingleTopic(topic, bt) { t.FailNow() } } @@ -837,7 +840,8 @@ func TestMatchSingleTopic_NotEquals_ReturnFalse(t *testing.T) { func TestMatchSingleTopic_InsufficientLength_ReturnFalse(t *testing.T) { bt := []byte("test") topic := BytesToTopic([]byte("not_equal")) - if matchSingleTopic(topic, bt) == true { + + if matchSingleTopic(topic, bt) { t.FailNow() } } diff --git a/whisper/whisperv6/filter_test.go b/whisper/whisperv6/filter_test.go index c45a66c382..6a669a2e83 100644 --- a/whisper/whisperv6/filter_test.go +++ b/whisper/whisperv6/filter_test.go @@ -837,7 +837,8 @@ func TestVariableTopics(t *testing.T) { func TestMatchSingleTopic_ReturnTrue(t *testing.T) { bt := []byte("test") topic := BytesToTopic(bt) - if matchSingleTopic(topic, bt) == false { + + if !matchSingleTopic(topic, bt) { t.FailNow() } } @@ -845,7 +846,8 @@ func TestMatchSingleTopic_ReturnTrue(t *testing.T) { func TestMatchSingleTopic_WithTail_ReturnTrue(t *testing.T) { bt := []byte("test with tail") topic := BytesToTopic([]byte("test")) - if matchSingleTopic(topic, bt) == false { + + if !matchSingleTopic(topic, bt) { t.FailNow() } } @@ -853,7 +855,8 @@ func TestMatchSingleTopic_WithTail_ReturnTrue(t *testing.T) { func TestMatchSingleTopic_NotEquals_ReturnFalse(t *testing.T) { bt := []byte("tes") topic := BytesToTopic(bt) - if matchSingleTopic(topic, bt) == true { + + if matchSingleTopic(topic, bt) { t.FailNow() } } @@ -861,7 +864,8 @@ func TestMatchSingleTopic_NotEquals_ReturnFalse(t *testing.T) { func TestMatchSingleTopic_InsufficientLength_ReturnFalse(t *testing.T) { bt := []byte("test") topic := BytesToTopic([]byte("not_equal")) - if matchSingleTopic(topic, bt) == true { + + if matchSingleTopic(topic, bt) { t.FailNow() } }