On Tue, Oct 2, 2012 at 5:15 PM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, Oct 2, 2012 at 5:59 PM, Alexander Kornienko <<a href="mailto:alexfh@google.com">alexfh@google.com</a>> wrote:<br>
> So I'm definitely for using FileCheck in this case, but it's only me, others<br>
> may disagree.<br>
<br>
</div>I'm in favor of ASTMatchers-based tests for anything dumping related,<br>
based on my experience of maintaining<br>
test/Index/annotate-comments.cpp.  Any small change to the testcases<br>
forces a change of line numbers for everything that follows it (half<br>
of tests, on average).</blockquote><div><br></div><div>FileCheck has variables now, maybe we can add a special __LINE__ variable (possibly with a way to specify offset)? In this case we could put CHECK lines near the actual test code and this would not be bound to absolute line numbers. What do you think?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">With ASTMatchers-based tests we can keep all<br>
logically related tests in a single file and keep the test case close<br>
to the expected output while ensuring that different tests are<br>
isolated from each other.<br></blockquote><div>Isolation is possible now using separate RUN lines with specific -D defines and #ifdef blocks.</div><div><br></div></div><br clear="all"><div>-- </div><div>Regards,</div><div>
Alex</div>