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)
| 174 | // assertSameVerdict fails the test unless both verifiers agree on |
| 175 | // success-or-failure. It does not compare error messages, only verdicts. |
| 176 | func 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 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…