EqualErrorf asserts that a function returned an error (i.e. not `nil`) and that it is equal to the provided error. actualObj, err := SomeFunction() assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted")
(t TestingT, theError error, errString string, msg string, args ...interface{})
| 90 | // actualObj, err := SomeFunction() |
| 91 | // assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") |
| 92 | func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) bool { |
| 93 | if h, ok := t.(tHelper); ok { |
| 94 | h.Helper() |
| 95 | } |
| 96 | return EqualError(t, theError, errString, append([]interface{}{msg}, args...)...) |
| 97 | } |
| 98 | |
| 99 | // EqualExportedValuesf asserts that the types of two objects are equal and their public |
| 100 | // fields are also equal. This is useful for comparing structs that have private fields |
no test coverage detected