MCPcopy
hub / github.com/google/uuid / testTest

Function testTest

uuid_test.go:98–113  ·  view source on GitHub ↗
(t *testing.T, in string, tt test)

Source from the content-addressed store, hash-verified

96}
97
98func testTest(t *testing.T, in string, tt test) {
99 uuid, err := Parse(in)
100 if ok := (err == nil); ok != tt.isuuid {
101 t.Errorf("Parse(%s) got %v expected %v\b", in, ok, tt.isuuid)
102 }
103 if err != nil {
104 return
105 }
106
107 if v := uuid.Variant(); v != tt.variant {
108 t.Errorf("Variant(%s) got %d expected %d\b", in, v, tt.variant)
109 }
110 if v := uuid.Version(); v != tt.version {
111 t.Errorf("Version(%s) got %d expected %d\b", in, v, tt.version)
112 }
113}
114
115func testBytes(t *testing.T, in []byte, tt test) {
116 uuid, err := ParseBytes(in)

Callers 1

TestUUIDFunction · 0.85

Calls 3

ParseFunction · 0.85
VariantMethod · 0.80
VersionMethod · 0.80

Tested by

no test coverage detected