summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Layher <mdlayher@gmail.com>2019-06-03 16:44:06 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-04 13:01:52 +0200
commit8d76ac8cc47cbe4072b2f5a48ede21c3e2d5ced0 (patch)
treef5121b478d9e89c5a683d6821746e2b5d208e413
parent18b6627f33883e28dd69b2990c52359002856694 (diff)
device: use bytes.Equal for equality check, simplify assertEqual
Signed-off-by: Matt Layher <mdlayher@gmail.com>
-rw-r--r--device/device_test.go4
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)
}
}