MCPcopy
hub / github.com/gofrs/uuid / testNewV5Basic

Function testNewV5Basic

generator_test.go:427–441  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

425}
426
427func testNewV5Basic(t *testing.T) {
428 ns := NamespaceDNS
429 name := "www.example.com"
430 u := NewV5(ns, name)
431 if got, want := u.Version(), V5; got != want {
432 t.Errorf("NewV5(%v, %q): got version %d, want %d", ns, name, got, want)
433 }
434 if got, want := u.Variant(), VariantRFC9562; got != want {
435 t.Errorf("NewV5(%v, %q): got variant %d, want %d", ns, name, got, want)
436 }
437 want := "2ed6657d-e927-568b-95e1-2665a8aea6a2"
438 if got := u.String(); got != want {
439 t.Errorf("NewV5(%v, %q) = %q, want %q", ns, name, got, want)
440 }
441}
442
443func testNewV5EqualNames(t *testing.T) {
444 ns := NamespaceDNS

Callers

nothing calls this directly

Calls 4

NewV5Function · 0.85
VersionMethod · 0.80
VariantMethod · 0.80
StringMethod · 0.80

Tested by

no test coverage detected