<div class="gmail_quote">On Tue, Jan 3, 2012 at 1:28 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On Jan 2, 2012, at 1:19 AM, Chandler Carruth wrote:<br>
<br>
> Author: chandlerc<br>
> Date: Mon Jan  2 03:19:48 2012<br>
> New Revision: 147431<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=147431&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=147431&view=rev</a><br>
> Log:<br>
> Undo the hack in r147427 and move this unittest to a better home. This<br>
> is testing the bitcode reader's functionality, not VMCore's. Add the<br>
> what is a hope sufficient build system mojo to build and run a new<br>
> unittest.<br>
><br>
> 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><br></div><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><br></div><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>