3 ms·
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 o
by atq2119 10mo 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.
- 0x696C6961 10mo agoHow is that not a unit test?
- rustybolt 10mo agoI've hear people refer to it as an end-to-end test, where unit tests usually test a single class or function.
- 0x696C6961 10mo agoThat'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.