errors_test.go
raw| 1 | package tensor |
| 2 | |
| 3 | import ( |
| 4 | "github.com/pkg/errors" |
| 5 | "github.com/stretchr/testify/assert" |
| 6 | "testing" |
| 7 | ) |
| 8 | |
| 9 | func TestHandleNoOp(t *testing.T) { |
| 10 | otherErr := errors.New("other error") |
| 11 | |
| 12 | assert.Equal(t, nil, handleNoOp(noopError{})) |
| 13 | assert.Equal(t, nil, handleNoOp(nil)) |
| 14 | assert.Equal(t, otherErr, handleNoOp(otherErr)) |
| 15 | } |