1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-04-28 13:48:56 +08:00
This commit is contained in:
yenck 2018-06-13 22:38:18 -07:00 committed by ss8651twtw
parent 99c3bfa396
commit b601ffa3e6

22
base/error_test.go Normal file
View File

@ -0,0 +1,22 @@
package base
import (
. "github.com/smartystreets/goconvey/convey"
"testing"
)
func TestId3(t *testing.T) {
Convey("Doing a error test", t, func(){
var _gerr GoLearnError
gerr := &_gerr
gerr.attachFormattedStack()
s := gerr.Error()
So(s, ShouldNotBeNil)
err := DescribeError("test", nil)
So(err, ShouldNotBeNil)
err = WrapError(nil)
So(err, ShouldNotBeNil)
s = wrapLinesWithTabPrefix("123\ntest\n")
So(s, ShouldEqual, "\t123\n\ttest\n\t")
})
}