You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sleevi I followed your proposal and refactored test test into a loop. To make this whole thing more re-useable and minimize the amount of duplicated code, I moved the definition of the TestCase struct and of the RunTest func into https://github.com/RufusJWB/zlint/blob/master/v2/test/helpers.go . Now they can be re-used wherever needed in the code.
I think it's fairly idiomatic to define this on a per-test basis. I wouldn't worry too much about duplication here.
I'm supportive of reworking existing tests into the "table driven" format favoured by the Go community but it's a high labour low reward task. If someone feels up to I won't try to dissuade them but it's also a lot of work without a ton of functional gains.
@sleevi I followed your proposal and refactored test test into a loop. To make this whole thing more re-useable and minimize the amount of duplicated code, I moved the definition of the
TestCase
struct and of theRunTest
func into https://github.com/RufusJWB/zlint/blob/master/v2/test/helpers.go . Now they can be re-used wherever needed in the code.Originally posted by @RufusJWB in #472 (comment)
The text was updated successfully, but these errors were encountered: