MCPcopy
hub / github.com/go-git/go-git / assertSameVerdict

Function assertSameVerdict

tests/objectverify/commit_test.go:176–190  ·  view source on GitHub ↗

assertSameVerdict fails the test unless both verifiers agree on success-or-failure. It does not compare error messages, only verdicts.

(t *testing.T, leftLabel string, leftErr error, rightLabel string, rightErr error)

Source from the content-addressed store, hash-verified

174// assertSameVerdict fails the test unless both verifiers agree on
175// success-or-failure. It does not compare error messages, only verdicts.
176func assertSameVerdict(t *testing.T, leftLabel string, leftErr error, rightLabel string, rightErr error) {
177 t.Helper()
178 leftOK := leftErr == nil
179 rightOK := rightErr == nil
180 if leftOK == rightOK {
181 if !leftOK {
182 t.Logf("both verifiers rejected (expected for malformed input)\n %s: %v\n %s: %v",
183 leftLabel, leftErr, rightLabel, rightErr)
184 }
185 return
186 }
187 assert.Failf(t, "verifier verdicts diverge",
188 "%s succeeded=%v err=%v\n%s succeeded=%v err=%v",
189 leftLabel, leftOK, leftErr, rightLabel, rightOK, rightErr)
190}

Callers 2

TestTagVerifyAlignmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…