-
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
suite: missing signature check before calling Test* method #1508
Labels
Comments
Please provide an example running on go.dev/play. |
I've added a go.dev example. |
This is definitely a dirty bug: Suite should check the method signature and report a test failure if the type doesn't match. A PR would be welcome. |
dolmen
changed the title
test panicked: reflect: Call with too few input arguments
suite: missing signature check before calling Test* method
Nov 22, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If a test method on a suite has a parameter there is a panic:
When running this you get the following panic:
I think the error handling could be more clear here. Something like "method TestUpdateSomething on SomeTestSuite contains arguments"
Here is the go.dev link: https://go.dev/play/p/cNNfqH5QpeQ
I can create a pull request if this change is wanted?
Edit: Some more context. I run into this problem when I am porting old test methods to a suite.
The text was updated successfully, but these errors were encountered: