func TestNew(t *testing.T) { const errStr = "foo bar baz" e := stackerr.New(errStr) matches := []string{ errStr, "stackerr_test.go:15 +TestNew$", } match(t, e.Error(), matches) }
func TestLog(t *testing.T) { t.Log(stackerr.New("hello")) }
func TestDoubleWrap(t *testing.T) { e := stackerr.New("") if stackerr.WrapSkip(e, 1) != e { t.Fatal("double wrap failure") } }