4 ms·
I am not a TDD person, but when you write some code you want to see if it works. So you either write a unit test, or you plugin your code and do the whole song
by stonemetal12 4y ago
I am not a TDD person, but when you write some code you want to see if it works. So you either write a unit test, or you plugin your code and do the whole song and dance to get execution to your new code.
I see TDD is REPL driven development for languages without a REPL. It allows you to play with your code in a tighter feed back loop, than you generally have without it.
- JonChesterfield 4y agoIt's closer to a repl with save state and replay. A repl will get the code working faster than tests but doesn't easily allow rechecking the same stuff later when things change (either your code or the users of it). I haven't seen a repl with save&replay but that might be a really efficient way to write the unit tests.
- sedachv 4y agoYou just copy-and-paste the relevant input-output and there is your test. There isn't a need for any extra tools when using the REPL to come up with regression tests (obviously a REPL cannot be used to do TDD).