Hacker News new | ask | show | jobs
by atq2119 171 days ago
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.
1 comments

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.