-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NotEqual doesnot work for pointer value in map #296
Comments
testify commit:67106a5111a06241c8d84952c33214675f51a34a |
Is this specific to pointers in maps or applicable to all pointer comparison? I ran into a similar issue comparing pointers without maps: func TestPointers(t *testing.T) {
i := 0
m := &i
j := 0
n := &j
assert.NotEqual(t, m, n)
}
Seems like an obvious use case so I wasn't sure if I was misunderstanding how this was expected to work. |
Hi Rob, It should be applicable to all pointers.
We must make that clear in the docs. On Wed, May 18, 2016 at 11:11 PM, Rob Strong notifications@github.com
Ernesto Jiménez |
I've created an issue to make docs more clear: #358 Closing this one. |
complete example:https://gist.github.com/xrtgavin/c63bc51914f40fe20fae1ca7dee13b40
Output:
The text was updated successfully, but these errors were encountered: