I’m writing a test that will go through multiple packages that will all contain a list of structs with the actual tests and one function to run against the data. The list and function will all be called the same thing in all of the packages. What I would like to avoid is having the same X number of lines per package and would like to be able to have a single function/group of instructions that can go through all of the imported test packages.
I would have done a search for this but I’m not really sure how to do a search for this.
Does anyone have suggestions about how to reduce the duplication in this scenario?
Just checked the link. It is working on-click but not suitable for URL copy-and-paste. Apparently, Google Sites converts all links into its URL redirecting format.
So took a brief look at the paper. As it turns out I had already decided on a table-driven approach. At the time I didn’t know that was a thing, it just seemed to make sense to me. I guess I can feel validated in the approach I chose
The paper goes beyond that as table-driven approach is only half way there. There were too many duplication that table-driven approach can’t solve on its own.