MCPcopy Create free account
hub / github.com/brimdata/super / diffInternal

Method diffInternal

ztest/ztest.go:384–398  ·  view source on GitHub ↗
(out string, err error)

Source from the content-addressed store, hash-verified

382}
383
384func (z *ZTest) diffInternal(out string, err error) error {
385 var outDiffErr, errDiffErr error
386 if z.Output != out {
387 outDiffErr = diffErr("output", z.Output, out)
388 }
389 var errStr string
390 if err != nil {
391 // Append newline if err doesn't end with one.
392 errStr = strings.TrimSuffix(err.Error(), "\n") + "\n"
393 }
394 if z.Error != errStr {
395 errDiffErr = diffErr("error", z.Error, errStr)
396 }
397 return errors.Join(outDiffErr, errDiffErr)
398}
399
400func (z *ZTest) Run(t *testing.T, path, filename string) {
401 if msg := z.ShouldSkip(path); msg != "" {

Callers 1

RunInternalMethod · 0.95

Calls 2

diffErrFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected