teemperor added a comment.

In D78697#2001682 <https://reviews.llvm.org/D78697#2001682>, @aleksandr.urakov 
wrote:

> Thanks! Fixed. The only thing is that `GetCString()` can return `nullptr`, 
> which leads to `None` in Python, so I made a simple wrapper for that.


I think GetCString should always return something when the expression fails 
unless something really goes wrong. I think the wrapper is a good idea for a 
more generic error handling code but in this case it just makes the test 
verbose and doesn't really add any new information (with and without the 
wrapper the program aborts with the same backtrace from what I can see. I would 
even say the concatenation with None error is a bit clearer in this situation, 
as we have a failure without an error string). Otherwise this is good to go.

> I'm not very deep into the testing infrastructure, so I'm not sure that I am 
> a right person to implement `assertSuccess` etc. Sorry about that.

Sure, I don't think that was meant to be a suggested enhancement for this 
specific line of patches.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78697/new/

https://reviews.llvm.org/D78697



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to