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

You don't really want or need classical unit tests for compilers. You need a harness that you can feed a program representation into and get a transformed one out, then check the result -- ideally mostly just by running it, or alternatively by comparing the output against a reference.


How is that not a unit test?


I've hear people refer to it as an end-to-end test, where unit tests usually test a single class or function.


That's only if you subscribe to the London school of though, which results in a bunch of useless tests that are coupled to implementation details.




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

Search: