[Lldb-commits] [PATCH] D126789: Stop regex commands from double entry into the history

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 1 15:29:39 PDT 2022


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



More information about the lldb-commits mailing list