jingham added a comment.

In D126789#3550572 <https://reviews.llvm.org/D126789#3550572>, @kastiglione 
wrote:

> thank you for fixing!
>
> Q: why does this test have this thin `test_X`/`do_x_test` separation?

We did that separation originally (and the sample test reflects that) so that 
you could see the list of tests in a file (with hopefully suggestive names) 
easily at the top, and then all the gritty details would be in the do_ methods 
below.  It's also good to remind yourself that for unittest all the "test_" 
methods are special, you can't use that name for a helper function...

This format is not unique to this test, many of the tests (particularly older 
ones or ones that copied the sample test) do it that way.  With tiny actual 
test bodies like these, it's unclear how much you gain by this, but the test 
was already mostly following that separation (except the test implementation 
was just copied over from the sample test) I followed the practice of the file.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126789

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

Reply via email to