1
0
mirror of https://github.com/google/uuid.git synced 2025-07-03 00:56:49 +02:00

[test] compare two slices of bytes thanks @maknihamdi

This commit is contained in:
Stéphane Jeandeaux
2017-07-21 14:30:00 +02:00
parent 1c6adf5cd1
commit cdf9b51fe8

View File

@ -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)