diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-09-23 10:17:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-23 10:17:51 -0400 |
commit | 2ca0e8f9a0f9863555a26e984cde15efff9ef8f8 (patch) | |
tree | daae1ee67b14a3d0a84424f2a304885d9e75ce2b /vendor/github.com/pborman/uuid/uuid_test.go | |
parent | 6d62d65b2dc85855aabea036cbd44f6059e19d13 (diff) | |
download | chat-2ca0e8f9a0f9863555a26e984cde15efff9ef8f8.tar.gz chat-2ca0e8f9a0f9863555a26e984cde15efff9ef8f8.tar.bz2 chat-2ca0e8f9a0f9863555a26e984cde15efff9ef8f8.zip |
Updating golang dependancies (#4075)
Diffstat (limited to 'vendor/github.com/pborman/uuid/uuid_test.go')
-rw-r--r-- | vendor/github.com/pborman/uuid/uuid_test.go | 74 |
1 files changed, 1 insertions, 73 deletions
diff --git a/vendor/github.com/pborman/uuid/uuid_test.go b/vendor/github.com/pborman/uuid/uuid_test.go index cb1cd5cf9..3835cc808 100644 --- a/vendor/github.com/pborman/uuid/uuid_test.go +++ b/vendor/github.com/pborman/uuid/uuid_test.go @@ -300,7 +300,7 @@ func TestNode(t *testing.T) { t.Error("nodeid is all zeros") } - id := []byte{1, 2, 3, 4, 5, 6, 7, 8} + id := []byte{1,2,3,4,5,6,7,8} SetNodeID(id) ni = NodeID() if !bytes.Equal(ni, id[:6]) { @@ -431,40 +431,6 @@ func TestBadRand(t *testing.T) { } } -func TestUUID_Array(t *testing.T) { - expect := Array{ - 0xf4, 0x7a, 0xc1, 0x0b, - 0x58, 0xcc, - 0x03, 0x72, - 0x85, 0x67, - 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79, - } - uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") - if uuid == nil { - t.Fatal("invalid uuid") - } - if uuid.Array() != expect { - t.Fatal("invalid array") - } -} - -func TestArray_UUID(t *testing.T) { - array := Array{ - 0xf4, 0x7a, 0xc1, 0x0b, - 0x58, 0xcc, - 0x03, 0x72, - 0x85, 0x67, - 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79, - } - expect := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") - if expect == nil { - t.Fatal("invalid uuid") - } - if !bytes.Equal(array.UUID(), expect) { - t.Fatal("invalid uuid") - } -} - func BenchmarkParse(b *testing.B) { for i := 0; i < b.N; i++ { uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") @@ -503,41 +469,3 @@ func BenchmarkUUID_URN(b *testing.B) { } } } - -func BenchmarkUUID_Array(b *testing.B) { - expect := Array{ - 0xf4, 0x7a, 0xc1, 0x0b, - 0x58, 0xcc, - 0x03, 0x72, - 0x85, 0x67, - 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79, - } - uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") - if uuid == nil { - b.Fatal("invalid uuid") - } - for i := 0; i < b.N; i++ { - if uuid.Array() != expect { - b.Fatal("invalid array") - } - } -} - -func BenchmarkArray_UUID(b *testing.B) { - array := Array{ - 0xf4, 0x7a, 0xc1, 0x0b, - 0x58, 0xcc, - 0x03, 0x72, - 0x85, 0x67, - 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79, - } - expect := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479") - if expect == nil { - b.Fatal("invalid uuid") - } - for i := 0; i < b.N; i++ { - if !bytes.Equal(array.UUID(), expect) { - b.Fatal("invalid uuid") - } - } -} |