<div dir="ltr"><div>(Sorry, hit enter too soon and truncated one of the comments)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 11, 2019 at 10:32 AM Sam McCall via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">sammccall added a comment.<br>
<br>
In D56370#1391924 <<a href="https://reviews.llvm.org/D56370#1391924" rel="noreferrer" target="_blank">https://reviews.llvm.org/D56370#1391924</a>>, @nridge wrote:<br>
<br>
> As far as reworking the tests to use these functions, I've thought about that a bit:<br>
><br>
> - These functions return AST nodes. It's not clear to me how I would come up with "expected" AST nodes to test the return values against.<br>
See FindDecl<br></blockquote><div>See the findDecl overloads in TestTU.h - we use these for such tests.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> - Even if we find a way to get "expected" AST nodes, we would be losing test coverage of functions like `declToTypeHierarchyItem()` (though I suppose we could write separate tests for that).<br></blockquote><div>Yes, please do add unit tests for the functions separately - findDecl() also words to get the input to that function.</div></div></div>