(t *testing.T)
| 184 | } |
| 185 | |
| 186 | func TestRandomUUID_Pooled(t *testing.T) { |
| 187 | defer DisableRandPool() |
| 188 | EnableRandPool() |
| 189 | m := make(map[string]bool) |
| 190 | for x := 1; x < 128; x++ { |
| 191 | uuid := New() |
| 192 | s := uuid.String() |
| 193 | if m[s] { |
| 194 | t.Errorf("NewRandom returned duplicated UUID %s", s) |
| 195 | } |
| 196 | m[s] = true |
| 197 | if v := uuid.Version(); v != 4 { |
| 198 | t.Errorf("Random UUID of version %s", v) |
| 199 | } |
| 200 | if uuid.Variant() != RFC4122 { |
| 201 | t.Errorf("Random UUID is variant %d", uuid.Variant()) |
| 202 | } |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | func TestNew(t *testing.T) { |
| 207 | m := make(map[UUID]bool) |
nothing calls this directly
no test coverage detected