You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
naza/pkg/errors/errors_test.go

19 lines
247 B
Go

package errors
import (
"errors"
"fmt"
"testing"
)
func TestPanicIfErrorOccur(t *testing.T) {
PanicIfErrorOccur(nil)
defer func() {
if err := recover(); err != nil {
fmt.Println(err)
}
}()
PanicIfErrorOccur(errors.New("fxxk."))
}