Skip to content
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

nil value TestReporter in NewController #99

Open
cyrusv opened this issue Sep 29, 2023 · 1 comment
Open

nil value TestReporter in NewController #99

cyrusv opened this issue Sep 29, 2023 · 1 comment

Comments

@cyrusv
Copy link

cyrusv commented Sep 29, 2023

Is this allowed or not? It does not throw an error right away, but opens the door for NPEs in methods like (h *nopTestHelper) Errorf(. I understand it might be backwards incompat to start enforcing now, so it is a constraint we can relax, or at least document?

@r-hang
Copy link
Contributor

r-hang commented Oct 3, 2023

I believe that we should support a nil input but rework the logic of the nopTestHelper to have an actual nop implementation instead of something that would panic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants