MCPcopy
hub / github.com/zeromicro/go-zero / TestBatchErrorOneError

Function TestBatchErrorOneError

core/errorx/batcherror_test.go:34–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

32}
33
34func TestBatchErrorOneError(t *testing.T) {
35 var batch BatchError
36 batch.Add(errors.New(err1))
37 assert.NotNil(t, batch.Err())
38 assert.Equal(t, err1, batch.Err().Error())
39 assert.True(t, batch.NotNil())
40}
41
42func TestBatchErrorWithErrors(t *testing.T) {
43 var batch BatchError

Callers

nothing calls this directly

Calls 6

AddMethod · 0.95
NotNilMethod · 0.95
ErrMethod · 0.95
TrueMethod · 0.80
EqualMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…