[Lldb-commits] [PATCH] D76080: Adjust error_msg handling for expect_expr in lldbtest.py
Shafik Yaghmour via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 12 12:28:58 PDT 2020
shafik added a comment.
In D76080#1919862 <https://reviews.llvm.org/D76080#1919862>, @jingham wrote:
>
> I'm on the fence about using a "find" not a strict string compare. The only reason you'd be passing in an error_msg is that you want to test that you got the error string you were expecting. I worry that using substrings will lead to weakening this test by having too general a match. OTOH, it would be super annoying to match all of some of the compiler's error messages...
I really would prefer not to have to match string like this `warning: <user expression 0>:1:4: '<=>' is a single token in C++20; add a space to avoid a change in behavior.*" != "warning: <user expression 0>:1:4: '<=>' is a single token in C++20; add a space to avoid a change in behavior\nb1 <=> b2\n ^\nerror: <user expression 0>:1:6: expected expression\nb1 <=> b2\n ^\n"`
it also feels fragile to changes in formatting etc...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76080/new/
https://reviews.llvm.org/D76080
More information about the lldb-commits
mailing list