aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/gorilla/feeds/uuid_test.go
blob: 140fbfd850a538ce6578e0c525e3b674e755fd85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package feeds

import (
	"testing"
)

func TestUUID(t *testing.T) {
	s := NewUUID()
	s2 := NewUUID()
	if len(s) != 16 {
		t.Errorf("Expecting len of 16, got %d\n", len(s))
	}
	if len(s.String()) != 36 {
		t.Errorf("Expecting uuid hex string len of 36, got %d\n", len(s.String()))
	}
	if s == s2 {
		t.Errorf("Expecting different UUIDs to be different, but they are the same.\n")
	}
}