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

Function checkDescribeNoRefsFound

describe_test.go:93–109  ·  view source on GitHub ↗
(t *testing.T, err error)

Source from the content-addressed store, hash-verified

91}
92
93func checkDescribeNoRefsFound(t *testing.T, err error) {
94 // The failure happens at wherever we were called, not here
95 _, file, line, ok := runtime.Caller(1)
96 expectedString := "no reference found, cannot describe anything"
97 if !ok {
98 t.Fatalf("Unable to get caller")
99 }
100 if err == nil || !strings.Contains(err.Error(), expectedString) {
101 t.Fatalf(
102 "%s:%v: was expecting error %v, got %v",
103 path.Base(file),
104 line,
105 expectedString,
106 err,
107 )
108 }
109}

Callers 1

TestDescribeCommitFunction · 0.85

Calls 1

ErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…