Skip to content

Commit

Permalink
Unexport FailNower
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ernesto-jimenez committed Jan 9, 2016
1 parent ac0e581 commit c6b07fe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions assert/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ type TestingT interface {
Errorf(format string, args ...interface{})
}

type FailNower interface {
FailNow()
}

// Comparison a custom function that returns true on success and false on failure
type Comparison func() (success bool)

Expand Down Expand Up @@ -185,6 +181,10 @@ func indentMessageLines(message string, tabs int) string {
return outBuf.String()
}

type failNower interface {
FailNow()
}

// FailNow fails test
func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool {
Fail(t, failureMessage, msgAndArgs...)
Expand All @@ -195,7 +195,7 @@ func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool
// TestingT.
// See issue #263

if t, ok := t.(FailNower); ok {
if t, ok := t.(failNower); ok {
t.FailNow()
} else {
panic("test failed and t is missing `FailNow()`")
Expand Down

0 comments on commit c6b07fe

Please sign in to comment.