mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add a flag to dump the C++ AST (#5918)
Use it to dump the AST that includes a generated C++ thunk. Based on #5917. Also added printing of the full actual text when check fails to make debugging easier. Changed line replacement to allow removing complete lines. Part of #5514.
This commit is contained in:
@@ -246,15 +246,23 @@ auto FileTestCase::TestBody() -> void {
|
||||
}
|
||||
if (test_file.check_subset) {
|
||||
EXPECT_THAT(SplitOutput(test_file.actual_stdout),
|
||||
IsSupersetOf(test_file.expected_stdout));
|
||||
IsSupersetOf(test_file.expected_stdout))
|
||||
<< "Actual text:\n"
|
||||
<< test_file.actual_stdout;
|
||||
EXPECT_THAT(SplitOutput(test_file.actual_stderr),
|
||||
IsSupersetOf(test_file.expected_stderr));
|
||||
IsSupersetOf(test_file.expected_stderr))
|
||||
<< "Actual text:\n"
|
||||
<< test_file.actual_stderr;
|
||||
|
||||
} else {
|
||||
EXPECT_THAT(SplitOutput(test_file.actual_stdout),
|
||||
ElementsAreArray(test_file.expected_stdout));
|
||||
ElementsAreArray(test_file.expected_stdout))
|
||||
<< "Actual text:\n"
|
||||
<< test_file.actual_stdout;
|
||||
EXPECT_THAT(SplitOutput(test_file.actual_stderr),
|
||||
ElementsAreArray(test_file.expected_stderr));
|
||||
ElementsAreArray(test_file.expected_stderr))
|
||||
<< "Actual text:\n"
|
||||
<< test_file.actual_stderr;
|
||||
}
|
||||
|
||||
if (HasFailure()) {
|
||||
|
||||
Reference in New Issue
Block a user