diff options
author | Matt Layher <mdlayher@gmail.com> | 2019-06-03 16:44:06 -0400 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-06-04 13:01:52 +0200 |
commit | 8d76ac8cc47cbe4072b2f5a48ede21c3e2d5ced0 (patch) | |
tree | f5121b478d9e89c5a683d6821746e2b5d208e413 /device | |
parent | 18b6627f33883e28dd69b2990c52359002856694 (diff) |
device: use bytes.Equal for equality check, simplify assertEqual
Signed-off-by: Matt Layher <mdlayher@gmail.com>
Diffstat (limited to 'device')
-rw-r--r-- | device/device_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/device/device_test.go b/device/device_test.go index b6212b5..cdbd458 100644 --- a/device/device_test.go +++ b/device/device_test.go @@ -61,8 +61,8 @@ func assertNil(t *testing.T, err error) { } } -func assertEqual(t *testing.T, a []byte, b []byte) { - if bytes.Compare(a, b) != 0 { +func assertEqual(t *testing.T, a, b []byte) { + if !bytes.Equal(a, b) { t.Fatal(a, "!=", b) } } |