Make syntax tree test print the line number when it fails
authorDmitri Gribenko <gribozavr@gmail.com>
Thu, 4 Jun 2020 08:35:43 +0000 (10:35 +0200)
committerDmitri Gribenko <gribozavr@gmail.com>
Thu, 4 Jun 2020 08:42:44 +0000 (10:42 +0200)
commit06cf7adcc88178f887984fa74cdefb20cd8cd124
treeb1c2ce91e884d33d48a6140814fb0eef28855e76
parent7a001a2d92a777de196eaaa070a4bfc23f40fd87
Make syntax tree test print the line number when it fails

Summary:
The syntax tree test uses a helper function that executes all testing
assertions. When an assertion fails, the only line number that gets
printed to the log refers to the helper function. After this change, we
would also get the line number of the EXPECT_TRUE macro invocation
(unfortunately, the line number of the last token of it, not the first
one, but there's not much I can do about it).

Reviewers: hlopko, eduucaldas

Reviewed By: hlopko, eduucaldas

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81107
clang/unittests/Tooling/Syntax/TreeTest.cpp