mirror of https://github.com/stretchr/testify.git
Unexport FailNower
failNower is for internal use and we must not export it. Since we just exported it a couple of days ago is unlikely this breking change will affect anybody.pull/266/head
parent
ac0e5818a1
commit
c6b07fe328
|
@ -23,10 +23,6 @@ type TestingT interface {
|
||||||
Errorf(format string, args ...interface{})
|
Errorf(format string, args ...interface{})
|
||||||
}
|
}
|
||||||
|
|
||||||
type FailNower interface {
|
|
||||||
FailNow()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Comparison a custom function that returns true on success and false on failure
|
// Comparison a custom function that returns true on success and false on failure
|
||||||
type Comparison func() (success bool)
|
type Comparison func() (success bool)
|
||||||
|
|
||||||
|
@ -185,6 +181,10 @@ func indentMessageLines(message string, tabs int) string {
|
||||||
return outBuf.String()
|
return outBuf.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type failNower interface {
|
||||||
|
FailNow()
|
||||||
|
}
|
||||||
|
|
||||||
// FailNow fails test
|
// FailNow fails test
|
||||||
func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool {
|
func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool {
|
||||||
Fail(t, failureMessage, msgAndArgs...)
|
Fail(t, failureMessage, msgAndArgs...)
|
||||||
|
@ -195,7 +195,7 @@ func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool
|
||||||
// TestingT.
|
// TestingT.
|
||||||
// See issue #263
|
// See issue #263
|
||||||
|
|
||||||
if t, ok := t.(FailNower); ok {
|
if t, ok := t.(failNower); ok {
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
} else {
|
} else {
|
||||||
panic("test failed and t is missing `FailNow()`")
|
panic("test failed and t is missing `FailNow()`")
|
||||||
|
|
Loading…
Reference in New Issue