From cdf9b51fe869cbbba7e78872cbd292a9a0cdd75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Jeandeaux?= Date: Fri, 21 Jul 2017 14:30:00 +0200 Subject: [PATCH] [test] compare two slices of bytes thanks @maknihamdi --- uuid_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/uuid_test.go b/uuid_test.go index 70986ff..2426168 100644 --- a/uuid_test.go +++ b/uuid_test.go @@ -246,7 +246,7 @@ func TestCoding(t *testing.T) { if err != nil { t.Errorf("Parse returned unexpected error %v", err) } - if data != data { + if data != uuid { t.Errorf("%s: decoded to %s, expected %s", text, uuid, data) } } @@ -471,7 +471,6 @@ func parseBytesUnsafe(b []byte) (UUID, error) { return Parse(*(*string)(unsafe.Pointer(&b))) } - func BenchmarkParseBytesUnsafe(b *testing.B) { for i := 0; i < b.N; i++ { _, err := parseBytesUnsafe(asBytes)