@tasx Would it perhaps be useful to look into a test generator again, now that we have a strategy for what things look like?
Aha, I believe I can see why it can’t easily be fixed.
that’s a very reasonable approach given that the test <n>
that is shown when tests are run will expand to only one test, instead of multiple. It just simplifies a lot of things.
Sure, give me some time to collect my thoughts on the topic, and we can continue in a new thread.
I’ve whipped up a little prototype to show that it doesn’t have to be that hard to add a generator: Some attempts by ErikSchierboom · Pull Request #728 · exercism/clojure · GitHub
I’m not sold on any of the code or libraries used, but consider this a proof of concept.
The test file in that PR is auto-generated from the canonical data
I’ll also add tests.toml support.
BTW I found it hard to find a suitable templating library that worked on my Clojure version (1.12) but that could be me. I’m open for other suggestions, as this library does not have a builtin whitespace trim feature which means more stuff put on a single line, or we need to add a function to the library (which is possible) or do post-processing.
@tasx I have a working prototype and opened a PR for you to review: Add test generator by ErikSchierboom · Pull Request #728 · exercism/clojure · GitHub
It works well IMHO. Of course, I’ve only yet focused on simple test cases, so we’ll see how it holds up for more complex exercises, but we also don’t have to create generators for every single exercise.
Excellent, that’s also what i had in mind.
Since that’s a lot of code, i’ll take a closer look starting from tomorrow. Apologies for the delays these days.