Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>I don't know anyone who doesn't write a little main or side program to test out the code they have created.

We're not met in person, but - here I am! As some of my colleagues.

Most of my tests do not leave REPL. Those that happen to be outside of REPL are "functional tests" - tests for a whole bunch of a system.



Why don't you just automate the REPL tests so they can be done for you? Whatever you type in the REPL, add it to the test suite. Whatever you check as output, that's your set of assertions. It will save you a whole lot of time in the future.


Why should I bother to convert tests from REPL? I use REPL for experiments along with testing. When I done experimenting I also done testing. When I'll return there, it would be for another experiment, significant part of my previous tests won't run again.

Also, I work mostly with pure functions and strong type systems. Those functions won't change their behavior if I change something in the system. These types won't let slip something bad that is hard to find.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: