[lldb-dev] unit testing C++ code in LLDB

Todd Fiala tfiala at google.com
Wed Jul 16 11:27:24 PDT 2014


Ah cool.  Yeah I like those.

I'll check out how llvm is doing it.


On Wed, Jul 16, 2014 at 11:13 AM, Zachary Turner <zturner at google.com> wrote:

> We should probably use gtest for this.  LLVM already has lots of examples
> of how to do this.  Check the llvm\unittests folder.
>
>
> On Wed, Jul 16, 2014 at 9:40 AM, Todd Fiala <tfiala at google.com> wrote:
>
>> Hey guys,
>>
>> Sometimes I have smaller bits of code I'd like to test in LLDB as I'm
>> developing them (i.e. TDD-style) that are C++ and won't be exposed directly
>> via Python.  I'm not sure I've seen any facilities in the LLDB tests for
>> adding such tests.  Essentially I'd want to do something like a gtest or
>> cppunit test.
>>
>> Do we have any mechanism for doing that currently?  If we do, what is it?
>>  If we don't, how about adding some mechanism to do it after we figure out
>> how we'd like to approach it?  Or, if you have thoughts on a good, simple
>> way to do it from Python that doesn't require extra Python bindings just to
>> do it, that'd be fine by me as well.
>>
>> If we want to take a concrete example, here is one: I'm adding a
>> NamedPipe class under the host dir.  I'd like to make some simple tests for
>> it, and test it under Linux, Windows and MacOSX.  In the case of Windows,
>> it would be the only real way for me to test that it's behaving exactly as
>> I want at this point.  This isn't the only time I've wanted C++-level tests
>> at a fairly fine granularity, but it's a good example of it.
>>
>> Any thoughts?
>> --
>> Todd Fiala | Software Engineer |  tfiala at google.com |  650-943-3180
>>
>> _______________________________________________
>> lldb-dev mailing list
>> lldb-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>>
>>
>


-- 
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140716/0dee14c9/attachment.html>


More information about the lldb-dev mailing list