NoErrorf asserts that a function returned no error (i.e. `nil`). actualObj, err := SomeFunction() if a.NoErrorf(err, "error message %s", "formatted") { assert.Equal(t, expectedObj, actualObj) }
(err error, msg string, args ...interface{})
| 1078 | // assert.Equal(t, expectedObj, actualObj) |
| 1079 | // } |
| 1080 | func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool { |
| 1081 | if h, ok := a.t.(tHelper); ok { |
| 1082 | h.Helper() |
| 1083 | } |
| 1084 | return NoErrorf(a.t, err, msg, args...) |
| 1085 | } |
| 1086 | |
| 1087 | // NoFileExists checks whether a file does not exist in a given path. It fails |
| 1088 | // if the path points to an existing _file_ only. |