2 ms·
"The reason we don't have more real unittests is IMO because: - it is hard to write (you need to mockup the analysis result that is used by the vectorizer if yo
by DannyBee 11y ago
"The reason we don't have more real unittests is IMO because: - it is hard to write (you need to mockup the analysis result that is used by the vectorizer if you want to test it in isolation)"
Right, and it's infinitely easier to just dump the result of the analysis and check that it said what you want using lit.
We even have a framework explicitly to do that -analyze for opt is specifically meant to run analysis and dump their output.
This doesn't test API boundaries, but the dumpers and printers are usually forced to be written in terms of the API.
(and folks are starting to get religion about testing the other API boundaries)