github.com/nikandfor/errors@v0.8.0/errors_go1.13_test.go (about) 1 // +build go1.13 2 3 package errors 4 5 import ( 6 "os" 7 "testing" 8 9 "github.com/stretchr/testify/assert" 10 ) 11 12 func TestIs(t *testing.T) { 13 mid := Wrap(os.ErrNotExist, "middle") 14 err := Wrap(mid, "global") 15 16 assert.True(t, Is(mid, os.ErrNotExist)) 17 assert.True(t, Is(err, os.ErrNotExist)) 18 }