[Lldb-commits] [PATCH] D34683: [unittests] Add a helper function for getting an input file

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 28 02:29:41 PDT 2017


labath marked an inline comment as done.
labath added a comment.

In https://reviews.llvm.org/D34683#792736, @eugene wrote:

> The only comment I have is about location of TestUtilities.cpp.
>  Utility\Helpers kinda implies that these are helpers for Utility tests which is not true.
>
> I would move it up one level up lldb/unittests/TestUtilities.cpp


Hm.. that makes sort of sense for this function.

However, right now I can't think of any other utility function that would go here. OTOH, I have a couple of ideas about the use of the `XXX/Helpers/YYY.h` pattern. For example, in `Host/Helpers` we could have a utility function which creates two connected sockets (already needed for a couple tests), and `Core/Helpers` could contain mocked versions of various Process/Target/... classes (as no higher level functionality can be tested without one of those around).

That's why I'd like to avoid creating a module if it's going to contain just this function. And with that in mind putting in in Utility/Helpers makes sense as that's the place everyone can pull it from without grabbing additional dependencies.


https://reviews.llvm.org/D34683





More information about the lldb-commits mailing list