<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 15 November 2013 04:38, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div class="im"><span style="color:rgb(34,34,34)">Right, validating my assertion that while TDD and unit testing are good in general, they may not be right for LLVM.  In LLVM, we have mature tests of other sorts, as well as a strong process of review.</span></div>
</div></blockquote><div><br></div><div>While I understand the value of TDD, I have to agree with Chris, here.</div><div><br></div><div>I have been bitten by having to write silly boundary checks tests that the code would never allow, and getting 100% test coverage (of lines AND branches), only to realize that a test engineer could break my new feature in many different ways by misusing it on a command-line level.</div>
<div><br></div><div>I personally think we'd have a much better use of time by making the MI layer dumpable and re-readable, so we could create lots of very specific low-level tests, than having yet-another unit-test infrastructure.</div>
<div><br></div><div>The only place I think that unit-tests are worthy is on base libraries (APFLoat, APInt, containers, basic algorithms), and for that, you need nothing special.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><div class="im"><span style="color:rgb(34,34,34)">Further, even if you guys didn't notice the bug immediately, I would have noticed it in my (planned) next commit.  That commit was the code that used it.  You don't need a unit test to catch obvious bozo bugs like the one you are referring to.</span></div>
</div></blockquote><div><br></div><div>That is the point. Most of us don't commit before a check-all anyway, so looking back on the commits list won't give you a clear picture.</div><div><br></div><div>cheers,</div>
<div>--renato</div></div></div></div>