MCPcopy Index your code
hub / github.com/expr-lang/expr / FailNow

Function FailNow

internal/testify/assert/assertions.go:325–343  ·  view source on GitHub ↗

FailNow fails test

(t TestingT, failureMessage string, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

323
324// FailNow fails test
325func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool {
326 if h, ok := t.(tHelper); ok {
327 h.Helper()
328 }
329 Fail(t, failureMessage, msgAndArgs...)
330
331 // We cannot extend TestingT with FailNow() and
332 // maintain backwards compatibility, so we fallback
333 // to panicking when FailNow is not available in
334 // TestingT.
335 // See issue #263
336
337 if t, ok := t.(failNower); ok {
338 t.FailNow()
339 } else {
340 panic("test failed and t is missing `FailNow()`")
341 }
342 return false
343}
344
345// Fail reports a failure through
346func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool {

Callers 5

FailNowFunction · 0.92
FailNowfFunction · 0.70
FailNowMethod · 0.70

Calls 3

FailFunction · 0.70
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…