-
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
Forward assertion error is confusing when mistakenly calling with *testing.T #119
Labels
Comments
I just got this error. Test are inconsistent. My travis build fails with the |
bzon
added a commit
to devopsctl/gitlabctl
that referenced
this issue
Jun 20, 2018
bzon
added a commit
to devopsctl/gitlabctl
that referenced
this issue
Jun 20, 2018
bzon
added a commit
to devopsctl/gitlabctl
that referenced
this issue
Jun 20, 2018
bzon
added a commit
to devopsctl/gitlabctl
that referenced
this issue
Jun 20, 2018
bzon
added a commit
to devopsctl/gitlabctl
that referenced
this issue
Jun 20, 2018
Closing due to no activity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When you write this:
but you really meant this:
because above you did this:
then you get this confusing panic, which seems to indicate that you're passing in a type that you're obviously not (string):
I think in this case it assumes the third argument is the assertion description and so expects a string type.
Perhaps the panic description could be made more helpful if it checked whether the first argument had type *testing.T and said something more helpful, like a hint that you shouldn't do that.
Note that this kind of problem happens (to me) often when I've written a lot of non-forward assertions, and then decide to use them but don't switch them all.
The text was updated successfully, but these errors were encountered: