leap: update example_gen.go & test cases#444
Conversation
ed1baf4 to
ece6181
Compare
| } | ||
| var j js | ||
| if err := gen.Gen("leap.json", &j, t); err != nil { | ||
| f := path.Join("exercises", "leap", "canonical-data.json") |
There was a problem hiding this comment.
Also reference #357 in the commit message, due to this change.
There was a problem hiding this comment.
Consider the effect of making this change across every single generator - we will be typing path.Join("exercises", whateverSlug, "canonical-data.json") a lot. Can/should this line be moved into the Gen function, and we just pass leap into Gen?
I won't oppose this change for this PR, but I'd advise it if working on more generators.
There was a problem hiding this comment.
I totally missed this issue, I stumbled upon this through trying to implement a test generator in another exercise.
I was thinking the same thing, I'll look into cancelling my other PR and updating the Gen function. Leave this one unmerged and hopefully I can update it along with the others.
There was a problem hiding this comment.
You probably don't have to cancel it - all the generators will still need to update to pass in only the slug rather than the filename (leap rather than leap.json), can just repurpose it to do the Gen update in that PR. Whichever is easier for you if you're going to work on it though.
ece6181 to
e0ed0da
Compare
the filepath needed used by example_gen.go was changed in exercism#224 the test cases were changed in this commit: exercism/problem-specifications#463
e0ed0da to
baa0a49
Compare
the filepath needed used by example_gen.go was changed in #224
the test cases were changed in this commit:
exercism/problem-specifications#463