-
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
Inaccurate MatchedBy error message #556
Comments
devdinu
pushed a commit
to devslives/testify
that referenced
this issue
Feb 11, 2018
…sest function call. closes stretchr#556 (cherry picked from commit d544d76e7e530242ef238769547e4c8fd442094e)
devdinu
pushed a commit
to devslives/testify
that referenced
this issue
Feb 11, 2018
…sest function call. closes stretchr#556
devdinu
pushed a commit
to devslives/testify
that referenced
this issue
Feb 21, 2018
…sest function call. closes stretchr#556
devdinu
pushed a commit
to devslives/testify
that referenced
this issue
Feb 21, 2018
…sest function call. closes stretchr#556
devdinu
pushed a commit
to devslives/testify
that referenced
this issue
Mar 11, 2018
…sest function call. closes stretchr#556
devdinu
pushed a commit
to devslives/testify
that referenced
this issue
Mar 11, 2018
…sest function call. closes stretchr#556
ernesto-jimenez
pushed a commit
that referenced
this issue
Mar 18, 2018
…sest function call. closes #556
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This might sorta-maybe be related to #432.
I'm trying to use MatchedBy to verify that I get the proper object. When I have MatchedBy just return true tests work:
However, as soon as I'm actually trying to compare values on foo like this:
Then I get this panic:
Update: After plenty of staring at my test cases and spotting that my test values didn't line up with what I wanted to match it against, I isolated this to Testify returning that error as soon as MatchedBy can't match the object we're testing. Simply having MatchedBy return false will give the same error.
That error message should be changed to give some information about what caused it, in this case MatchedBy() failing to match.
The text was updated successfully, but these errors were encountered: