-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
added usage of subtests food-chain #2435
Conversation
Dear eklatzerThank you for contributing to the Go track on Exercism! 💙
Dear Reviewer/Maintainer
Automated comment created by PR Commenter 🤖. |
if ret := Verse(v); ret != ref[v] { | ||
t.Fatalf("Verse(%d) =\n%s\n want:\n%s\n%s", v, ret, ref[v], diff(ret, ref[v])) | ||
} | ||
t.Run(strconv.Itoa(v), func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can put a description here too. In the simplest form, it can just be an strconv.Itoa(v) + " verses"
, but it might be worth to convert the test cases to a slice of test cases, where each test case can be something like:
type testCase struct {
description string
verses int
expectedText string
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I don't think there is a need of adding a struct and testcases, I have simply added verse
to the description, what do you think?
Co-authored-by: André Santos <[email protected]>
One of #2098