[lldb] Improve test failure reporting for expect()
This updates the errors reported by expect() to something like: ``` Ran command: "help" Got output: Debugger commands: <...> Expecting start string: "Debugger commands:" (was found) Expecting end string: "foo" (was not found) ``` (see added tests for more examples) This shows the user exactly what was run, what checks passed and which failed. Along with whether that check was supposed to pass. (including what regex patterns matched) These lines are also output to the test trace file, whether the test passes or not. Note that expect() will still fail at the first failed check, in line with previous behaviour. Also I have flipped the wording of the assert message functions (.*_MSG) to describe failures not successes. This makes more sense as they are only shown on assert failures. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D86792
Loading
Please sign in to comment