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

Function testNullUUIDScanNil

sql_test.go:168–180  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

166}
167
168func testNullUUIDScanNil(t *testing.T) {
169 u := NullUUID{}
170 err := u.Scan(nil)
171 if err != nil {
172 t.Fatal(err)
173 }
174 if u.Valid {
175 t.Error("NullUUID is valid after Scan(nil)")
176 }
177 if u.UUID != Nil {
178 t.Errorf("NullUUID.UUID is %v after Scan(nil) want Nil", u.UUID)
179 }
180}
181
182func testNullUUIDScanValid(t *testing.T) {
183 s := "6ba7b810-9dad-11d1-80b4-00c04fd430c8"

Callers

nothing calls this directly

Calls 2

ScanMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected