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
The testable example "ExamplePrivateHandle" is incorrectly passing #1299
Comments
Thanks! I've never been a huge fan of how Go did Example testing and clearly it can be quite britle. Would you care to open a PR and fix it? If not, let me know and I'll be happy to. |
This isn't simple "just move one comment" case. In this case the |
You can provide a function that returns an ID that is static for this test.
…On Thu, 18 Nov 2021, 22:09 Amelia Downs, ***@***.***> wrote:
This isn't simple "just move one comment" case. In this case the id
changes every time you run this code. I'll let you handle this PR @tmthrgd
<https://github.com/tmthrgd> 😄
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1299 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACWIW45DIV4YLTXCJMO4ADUMVTPHANCNFSM5EPA5NIQ>
.
|
Fixed via #1354 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👋 Hello,
I am investigating the golang issue: golang/go#48362, where testable examples are causing false positives when the output comment block is not the last comment block example.
I ran a parser against the top golang repos, including this repo and I found this bug with your ExamplePrivateHandle testable example.
If you combine the comment blocks to test as intended (see below) your test fails because the id is not
1234
like the output expects.This is the code I suspect that you intended:
This fails with:
The text was updated successfully, but these errors were encountered: