MCPcopy Create free account
hub / github.com/libgit2/git2go / checkRefType

Function checkRefType

reference_test.go:262–273  ·  view source on GitHub ↗
(t *testing.T, ref *Reference, kind ReferenceType)

Source from the content-addressed store, hash-verified

260}
261
262func checkRefType(t *testing.T, ref *Reference, kind ReferenceType) {
263 if ref.Type() == kind {
264 return
265 }
266
267 // The failure happens at wherever we were called, not here
268 _, file, line, ok := runtime.Caller(1)
269 if !ok {
270 t.Fatalf("Unable to get caller")
271 }
272 t.Fatalf("Wrong ref type at %v:%v; have %v, expected %v", file, line, ref.Type(), kind)
273}

Callers 1

TestRefModificationFunction · 0.85

Calls 1

TypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…