3 ms·
It's true - Haskell people use a lot of testing, since it's pretty simple to do in that environment. However, compilers in my experience are extremely easy to t
by viraptor 16y ago
It's true - Haskell people use a lot of testing, since it's pretty simple to do in that environment. However, compilers in my experience are extremely easy to test. You can start building your input at whatever stage of compiling you need, run a specific transformation phase on it and check the output. I'd risk the opinion that compiler is the easiest to test "advanced" piece of software. Because of that, I'd be more surprised by a compiler project without regression tests.
- doty 16y agoYou're right that it's pretty easy to write the individual tests. But on the whole, I disagree: in my experience, compilers for non-trivial languages have an extremely large surface area, especially when optimization is involved. Language features have the habit of interacting with each other in non-trivial ways, and the combinatorics can quickly get overwhelming.