示例#1
0
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)
}
示例#2
0
func TestLog(t *testing.T) {
	t.Log(stackerr.New("hello"))
}
示例#3
0
func TestDoubleWrap(t *testing.T) {
	e := stackerr.New("")
	if stackerr.WrapSkip(e, 1) != e {
		t.Fatal("double wrap failure")
	}
}