MCPcopy
hub / github.com/apache/devlake / TestIs

Function TestIs

backend/core/errors/util_test.go:25–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestIs(t *testing.T) {
26 type args struct {
27 err error
28 target error
29 }
30 tests := []struct {
31 name string
32 args args
33 want bool
34 }{
35 {
36 "",
37 args{
38 Default.Wrap(Convert(context.Canceled), "wrap"),
39 context.Canceled,
40 },
41 true,
42 },
43 }
44 for _, tt := range tests {
45 t.Run(tt.name, func(t *testing.T) {
46 if got := Is(tt.args.err, tt.args.target); got != tt.want {
47 t.Errorf("Is() = %v, want %v", got, tt.want)
48 }
49 })
50 }
51}

Callers

nothing calls this directly

Calls 4

IsFunction · 0.85
WrapMethod · 0.80
RunMethod · 0.80
ConvertFunction · 0.70

Tested by

no test coverage detected