aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisperv2/filter_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'whisper/whisperv2/filter_test.go')
-rw-r--r--whisper/whisperv2/filter_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/whisper/whisperv2/filter_test.go b/whisper/whisperv2/filter_test.go
index 5a14a84bb..ffdfd7b34 100644
--- a/whisper/whisperv2/filter_test.go
+++ b/whisper/whisperv2/filter_test.go
@@ -91,7 +91,7 @@ func TestFilterTopicsCreation(t *testing.T) {
continue
}
for k := 0; k < len(condition); k++ {
- if bytes.Compare(condition[k][:], tt.filter[j][k][:]) != 0 {
+ if !bytes.Equal(condition[k][:], tt.filter[j][k][:]) {
t.Errorf("test %d, condition %d, segment %d: filter mismatch: have 0x%x, want 0x%x", i, j, k, condition[k], tt.filter[j][k])
}
}
@@ -115,7 +115,7 @@ func TestFilterTopicsCreation(t *testing.T) {
continue
}
for k := 0; k < len(condition); k++ {
- if bytes.Compare(condition[k][:], tt.filter[j][k][:]) != 0 {
+ if !bytes.Equal(condition[k][:], tt.filter[j][k][:]) {
t.Errorf("test %d, condition %d, segment %d: filter mismatch: have 0x%x, want 0x%x", i, j, k, condition[k], tt.filter[j][k])
}
}
@@ -135,7 +135,7 @@ func TestFilterTopicsCreation(t *testing.T) {
continue
}
for k := 0; k < len(condition); k++ {
- if bytes.Compare(condition[k][:], tt.filter[j][k][:]) != 0 {
+ if !bytes.Equal(condition[k][:], tt.filter[j][k][:]) {
t.Errorf("test %d, condition %d, segment %d: filter mismatch: have 0x%x, want 0x%x", i, j, k, condition[k], tt.filter[j][k])
}
}
@@ -156,7 +156,7 @@ func TestFilterTopicsCreation(t *testing.T) {
continue
}
for k := 0; k < len(condition); k++ {
- if bytes.Compare(condition[k][:], tt.filter[j][k][:]) != 0 {
+ if !bytes.Equal(condition[k][:], tt.filter[j][k][:]) {
t.Errorf("test %d, condition %d, segment %d: filter mismatch: have 0x%x, want 0x%x", i, j, k, condition[k], tt.filter[j][k])
}
}