"Amount of unit tests is pretty small comparing to regression tests. One reason behind that decision is that LLVM internals constantly change all the time. "<p>Well, no, and i'm not sure where they got this. It's not a "decision".
BTW, This also assumes that all of the tests in the unit test dir are unit tests, and all the tests in test/ are regression tests.<p>This is explicitly false.<p>The general viewpoint of LLVM is that most things people write (analysis, optimization) should be tested by checking the IR or dumps. That is, we want easy to follow and modify unit tests, not just compilable C++ code ones.<p>Thus, you will find a lot of unit tests that are in test/, instead of unittest/, because they are testable using IR printers.<p>Those things that are API's should be tested by unittests, and work is underway to increase coverage. The reason some things aren't cover is simply that in the earlier days of the project, not all of this got unit tests, and it's only in the past couple years that people have become sticklers about it.<p>So that one would be knowingly "not enforcing good development practices", not "llvm internals change all the time". The fact that internals change all the time is in fact a <i>good</i> reason to <i>have</i> unit tests.
If you're interested in the testing techniques used by established open source software, here are a couple projects that appear to have far more extensive test coverage than LLVM:<p>SQLite ( <a href="https://sqlite.org/testing.html" rel="nofollow">https://sqlite.org/testing.html</a> )<p>Opus ( <a href="https://www.ietf.org/proceedings/82/slides/codec-4.pdf" rel="nofollow">https://www.ietf.org/proceedings/82/slides/codec-4.pdf</a> )<p>I don't mean it as criticism of the LLVM project, as I haven't worked with it and can't say whether its tests are sufficient. Only that, from reading this overview, its testing techniques do not seem particularly elaborate.
Very nice. Anyone could point me to LLVM's code coverage and whether they use TDD?<p>"Amount of unit tests is pretty small comparing to regression tests. One reason behind that decision is that LLVM internals constantly change all the time. Supporting tests under such conditions is very time consuming."<p>Isn't the whole promise of testing is easier maintenance in the long run?
Also, regression tests seem to run much faster, is it because of the Google Test?