MCPcopy Create free account
hub / github.com/expr-lang/expr / NoErrorf

Function NoErrorf

internal/testify/require/require.go:1367–1375  ·  view source on GitHub ↗

NoErrorf asserts that a function returned no error (i.e. `nil`). actualObj, err := SomeFunction() if assert.NoErrorf(t, err, "error message %s", "formatted") { assert.Equal(t, expectedObj, actualObj) }

(t TestingT, err error, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

1365// assert.Equal(t, expectedObj, actualObj)
1366// }
1367func NoErrorf(t TestingT, err error, msg string, args ...interface{}) {
1368 if h, ok := t.(tHelper); ok {
1369 h.Helper()
1370 }
1371 if assert.NoErrorf(t, err, msg, args...) {
1372 return
1373 }
1374 t.FailNow()
1375}
1376
1377// NoFileExists checks whether a file does not exist in a given path. It fails
1378// if the path points to an existing _file_ only.

Callers 1

NoErrorfMethod · 0.70

Calls 3

NoErrorfFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…