summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSerguei Bezverkhi <sbezverk@cisco.com>2020-05-07 07:47:26 -0400
committerSerguei Bezverkhi <sbezverk@cisco.com>2020-05-07 07:47:26 -0400
commit3a6211a79379f486f9dd251c1893fd1ce5a9e9e5 (patch)
treec3e889547fd1b5297f43eac0cf5eb9a433f9df6b
parent7bdaeb349bd9cbba320a0147010ea0b496c09a1b (diff)
Addressing review comments
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
-rw-r--r--pkg/packet/bgp/prefix_sid_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/packet/bgp/prefix_sid_test.go b/pkg/packet/bgp/prefix_sid_test.go
index 82a8732e..2df8a3a3 100644
--- a/pkg/packet/bgp/prefix_sid_test.go
+++ b/pkg/packet/bgp/prefix_sid_test.go
@@ -25,7 +25,7 @@ func TestRoundTripSubSubTLV(t *testing.T) {
if err != nil {
t.Fatalf("test failed with error: %+v", err)
}
- if bytes.Compare(tt.input, recovered) != 0 {
+ if !bytes.Equal(tt.input, recovered) {
t.Fatalf("round trip conversion test failed as expected prefix sid attribute %+v does not match actual: %+v", tt.input, recovered)
}
})
@@ -52,7 +52,7 @@ func TestRoundTripSubTLV(t *testing.T) {
if err != nil {
t.Fatalf("test failed with error: %+v", err)
}
- if bytes.Compare(tt.input, recovered) != 0 {
+ if !bytes.Equal(tt.input, recovered) {
t.Fatalf("round trip conversion test failed as expected prefix sid attribute %+v does not match actual: %+v", tt.input, recovered)
}
})
@@ -82,7 +82,7 @@ func TestRoundTripPrefixSID(t *testing.T) {
if err != nil {
t.Fatalf("test failed with error: %+v", err)
}
- if bytes.Compare(tt.input, recovered) != 0 {
+ if !bytes.Equal(tt.input, recovered) {
t.Fatalf("round trip conversion test failed as expected prefix sid attribute %+v does not match actual: %+v", tt.input, recovered)
}
})