diff options
author | Jeff Bean <bean@uber.com> | 2018-06-22 19:12:33 -0700 |
---|---|---|
committer | Jeff Bean <bean@uber.com> | 2018-06-22 19:12:33 -0700 |
commit | 154650594c5b40b2905eb73b90f52de72f6ced16 (patch) | |
tree | 2ba6ffe099ff216a92df7fb3806eb9aeaa988208 /packet/bmp | |
parent | 954562d65a90af4e8d2e9bf29e4c2bccc4420b38 (diff) |
Fixing all megacheck errors.
Diffstat (limited to 'packet/bmp')
-rw-r--r-- | packet/bmp/bmp_test.go | 20 |
1 files changed, 7 insertions, 13 deletions
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) { |