rundel / md4r

An R wrapper for the md4c markdown parsing library
https://rundel.github.io/md4r/
Other
4 stars 1 forks source link

Use code generation for roundtrip tests #5

Closed krlmlr closed 6 months ago

krlmlr commented 6 months ago

The current roundtrip tests read specs and run the tests from the spec. I have had a great experience with generating test code instead. The advantage is that, when a test fails, the failure and the steps to reproduce are easier to see than when going through an indirection.

My DBItest is the prime counterexample. Slowly working on transforming it to generated code.

Happy to help set up infrastructure that worked for me elsewhere.

Reference: https://mtlynch.io/good-developers-bad-tests/ .

rundel commented 6 months ago

This totally makes sense - not an option that I had considered and something I am happy to try to implement.

krlmlr commented 6 months ago

Happy to assist, this would give me another opportunity to get feedback on the pattern.

krlmlr commented 6 months ago

Starting to work on the code generation now.

rundel commented 6 months ago

Added via #7