<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jan 3, 2012, at 1:55 PM, Chandler Carruth wrote:</div><blockquote type="cite"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div class="im">> Also clean up some of the test's naming. The goal for the file should be<br>
> to unittest the Bitcode Reader, and this is just one particular test<br>
> among potentially many in the future. Also, reverse my position and<br>
> relegate the PR# to a comment, but stash the comment on the same line as<br>
> the test name so it doesn't get lost. This makes the code more<br>
> self-documenting hopefully w/o losing track of the PR number.<br>
<br>
</div>Ugh.  Why is this worth having a unit test for?  Is the pain/benefit ratio here actually in favor of having the test?<br></blockquote><div><br></div><div>What pain are you feeling from this unit test? That the code to implement the unit test is ugly? I certainly don't like that part of it…</div></div></blockquote><div><br></div><div>The fact that a 2 line patch has a testcase that is an order of magnitude larger than it, requires another unit test to be linked (slowing down builds), the fact that Rafael had to waste his (presumably valuable ;-) time writing it, etc.</div><div><br></div><div>This seems like a complete waste of time.</div><br><blockquote type="cite"><div class="gmail_quote">
<div>I think this is still worth having because this wasn't just a new unit test, this was a regression test for a bug we actually hit during LTO. It seems reasonable to want to test that we don't re-introduce the bug.</div></div></blockquote><div><br></div><div>Why not write this as an LTO test in llvm/test/Linker then?</div><br><blockquote type="cite"><div class="gmail_quote">
<div>However, I also think that writing tests like this could be *much* cleaner and simpler in order to reduce the pain of adding and maintaining them. I was hoping to wait for test #2 or #3 before investing in that infrastructure, but I can do it sooner if you'd just like to see what it would look like. I've been thinking about it a while and have some ideas of what I would really like tests of this nature to look like...</div>
</div>
</blockquote></div><br><div>Why not just use the proper infrastructure we already have for this, instead of pushing unit tests?</div><div><br></div><div>-Chris</div></body></html>