From 154650594c5b40b2905eb73b90f52de72f6ced16 Mon Sep 17 00:00:00 2001 From: Jeff Bean Date: Fri, 22 Jun 2018 19:12:33 -0700 Subject: Fixing all megacheck errors. --- packet/bmp/bmp_test.go | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'packet/bmp') diff --git a/packet/bmp/bmp_test.go b/packet/bmp/bmp_test.go index 266d6b99..fde4cd0f 100644 --- a/packet/bmp/bmp_test.go +++ b/packet/bmp/bmp_test.go @@ -16,27 +16,21 @@ package bmp import ( + "testing" + + "github.com/stretchr/testify/require" + "github.com/osrg/gobgp/packet/bgp" + "github.com/stretchr/testify/assert" - "reflect" - "testing" ) func verify(t *testing.T, m1 *BMPMessage) { buf1, _ := m1.Serialize() m2, err := ParseBMPMessage(buf1) - if err != nil { - t.Error(err) - } - buf2, _ := m2.Serialize() + require.NoError(t, err) - if reflect.DeepEqual(m1, m2) == true { - t.Log("OK") - } else { - t.Error("Something wrong") - t.Error(len(buf1), m1, buf1) - t.Error(len(buf2), m2, buf2) - } + assert.Equal(t, m1, m2) } func Test_Initiation(t *testing.T) { -- cgit v1.2.3