Equalf asserts that two objects are equal. assert.Equalf(t, 123, 123, "error message %s", "formatted") Pointer variable equality is determined based on the equality of the referenced values (as opposed to the memory addresses). Function equality cannot be determined and will always fail.
(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{})
| 269 | // referenced values (as opposed to the memory addresses). Function equality |
| 270 | // cannot be determined and will always fail. |
| 271 | func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { |
| 272 | if h, ok := t.(tHelper); ok { |
| 273 | h.Helper() |
| 274 | } |
| 275 | if assert.Equalf(t, expected, actual, msg, args...) { |
| 276 | return |
| 277 | } |
| 278 | t.FailNow() |
| 279 | } |
| 280 | |
| 281 | // Error asserts that a function returned an error (i.e. not `nil`). |
| 282 | // |