You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a func Dispatch(something interface{}) which is used by the code I want to test. That code looks something like this:
dispatcher.Dispatch(&Something{Name: "foo"})
Calling mockDispatcher.AssertCalled(t, "Dispatch", &Something{Name: "foo"}) passes, as expected.
But when I write a test that calls mockDispatcher.AssertCalled(t, "Dispatch", &Something{Name: "bar"}) it fails with an error like:
Messages: Expected "Dispatch" to have been called with:
[0xc00009c800]
but actual calls were:
[0xc000083030]
This is misleading, as I thought the problem was that testify does not do a deep comparison (which is wrong, judging by the passing test).
I'd expect the printed message to be a bit more verbose so the user can tell it's a problem with the values referenced by the pointer, not the pointer itself.
The text was updated successfully, but these errors were encountered:
I have a
func Dispatch(something interface{})
which is used by the code I want to test. That code looks something like this:Calling
mockDispatcher.AssertCalled(t, "Dispatch", &Something{Name: "foo"})
passes, as expected.But when I write a test that calls
mockDispatcher.AssertCalled(t, "Dispatch", &Something{Name: "bar"})
it fails with an error like:This is misleading, as I thought the problem was that testify does not do a deep comparison (which is wrong, judging by the passing test).
I'd expect the printed message to be a bit more verbose so the user can tell it's a problem with the values referenced by the pointer, not the pointer itself.
The text was updated successfully, but these errors were encountered: