-
Notifications
You must be signed in to change notification settings - Fork 344
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
Use subtests once Go 1.7 is released #23
Comments
+1 This is an amazing work you've done here. Thanks for spoon-feeding us lazy bums :) |
@cweill Is this something you would accept a PR for? I just started using the package in VSCode and would write this up soon if it isn't already being worked on. I assume it should conditionally use the old template for 1.6, and use the subtests template for >=1.7? |
@itsjamie I would be open to PR if you are interested in taking this on. I know a lot of people who would really appreciate this feature, but I haven't had the time to work on this lately. There would be three requirements:
|
I've started to work on this. The approach I'm taking is creating a new template for >= Go 1.7. Then, maintain the backwards compatibility I'm using build tags, so for <Go 1.7, the template functions target the existing template, and for Go 1.7+ they target the new template. I moved the template into two separate files just to see all the differences. If you would rather have it just use conditions in the same template, that can also be done. I'll put the PR up when I get access to my personal computer today so you can review and let me know what I need to fix. |
Sounds good! Looking forward to your PR. |
@itsjamie thanks again for your help! I posted on r/golang, and it seems like a lot of Gophers are excited to have this feature. https://www.reddit.com/r/golang/comments/5bo6tp/gotests_test_generation_tool_now_supports/ |
Neat. Thanks for letting me. Now I can work on getting the behaviour and flag supported in vscode :) In case you didn't know they use your binary in the official vscode-go extension. |
Subtests are introduced in Go 1.7. They'll be very useful for table driven tests.
See golang/go#9268
The text was updated successfully, but these errors were encountered: