[lldb-dev] lldb tests and tear down hooks

Zachary Turner via lldb-dev lldb-dev at lists.llvm.org
Fri Jan 15 08:01:09 PST 2016


There's no reason a finally block inside each test method wouldn't work,
and that's probably the simplest solution.

On Fri, Jan 15, 2016 at 12:59 AM Pavel Labath <labath at google.com> wrote:

> On 14 January 2016 at 21:52, Zachary Turner via lldb-dev
> <lldb-dev at lists.llvm.org> wrote:
> > So what if tests could be *either* a method *or* a nested class.  If
> it's a
> > nested class, it could provide setUp, tearDown, and run methods.  These
> > setup and teardown methods can do whatever they want specific to the
> > individual test, and it also provides the exception safe way to clean up.
>
> I don't think this is supported by unittest, which is what determines
> what constitutes a "test". Nothing that couldn't be hacked around, but
> I don't see the added value over just using a finally block.
>
> Was there any reason we couldn't use that? I don't think it prevents
> code reuse, and it's a standard way of doing things that everyone
> should be familiar with.
>
> pl
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160115/4fd075de/attachment.html>


More information about the lldb-dev mailing list