<div class="gmail_quote">2009/12/18 Rafael Espindola <span dir="ltr"><<a href="mailto:espindola@google.com">espindola@google.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div class="im">> Could you please write a unit test for this? It took me a while to figure<br>
> out what was wrong with the original code (even when it was obvious your<br>
> patch was correct). The case is:<br>
>   addGarbage(A);<br>
>   addGarbage(B);<br>
>   addGarbage(A);  // not caught as already in set...<br>
>   removeGarbage(A);  // ...unless this were remove(X) where X != A<br>
> though that would have to be a death test which only works in an asserts<br>
> build. See unittests/ADT/APIntTest.cpp for an example of a death test in<br>
> LLVM.<br>
<br>
</div>Good idea!<br>
<br>
The attached patch includes a test.<br></blockquote><div><br>Looks great, please commit!<br><br>Nick</div></div><br>