(t *testing.T)
| 11 | ) |
| 12 | |
| 13 | func TestError_NotFound(t *testing.T) { |
| 14 | tests := []struct { |
| 15 | err error |
| 16 | expVal bool |
| 17 | }{ |
| 18 | {err: git.ErrSubmoduleNotExist, expVal: true}, |
| 19 | {err: git.ErrRevisionNotExist, expVal: true}, |
| 20 | {err: git.ErrNoMergeBase, expVal: false}, |
| 21 | } |
| 22 | for _, test := range tests { |
| 23 | t.Run("", func(t *testing.T) { |
| 24 | assert.Equal(t, test.expVal, errutil.IsNotFound(NewError(test.err))) |
| 25 | }) |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | func TestIsErrRevisionNotExist(t *testing.T) { |
| 30 | assert.True(t, IsErrRevisionNotExist(git.ErrRevisionNotExist)) |
nothing calls this directly
no test coverage detected