MCPcopy Create free account
hub / github.com/gogs/gogs / TestError_NotFound

Function TestError_NotFound

internal/osutil/error_test.go:12–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestError_NotFound(t *testing.T) {
13 tests := []struct {
14 err error
15 expVal bool
16 }{
17 {err: os.ErrNotExist, expVal: true},
18 {err: os.ErrClosed, expVal: false},
19 }
20 for _, test := range tests {
21 t.Run("", func(t *testing.T) {
22 assert.Equal(t, test.expVal, errutil.IsNotFound(NewError(test.err)))
23 })
24 }
25}

Callers

nothing calls this directly

Calls 2

IsNotFoundFunction · 0.92
NewErrorFunction · 0.70

Tested by

no test coverage detected