[Lldb-commits] [lldb] Colorize output when searching for symbols in lldb (PR #69422)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 6 01:31:04 PST 2023


DavidSpickett wrote:

> Was facing some issues while checking for empty string using:

You don't need to check for an empty string here. You're checking that it found 0 symbols, that's the string you want (which will be colourless of course).

The check for this is not "check my functions did the right thing" it's more "check that this RUN put lldb into the state I think they should do". What the test wants to see is that lldb did not crash because it tried to add colours to 0 symbols.

The CHECK is case in future this RUN starts finding a symbol. If it found a symbol, it wouldn't be testing the case where your code is not run. Or rather, should not be run, but if you had made a mistake, it might be.

Again, this is a "nop" test, no symbols in, no coloured output out. Seems like you wouldn't need to test it, but we all make silly mistakes sometimes so it's nice to have.

https://github.com/llvm/llvm-project/pull/69422


More information about the lldb-commits mailing list