[vtk-developers] C++ unit tests

David Gobbi david.gobbi at gmail.com
Tue Jul 28 10:43:00 EDT 2015


Hi David (and David),

The only advantage of my unit test header is that it is a single header
(a short one, too) with zero dependencies.  So it's easy to add to VTK
and it's trivial to maintain.

If either of you has a better solution, then go ahead and make a merge
request.  I'll review it for you ;)

 - David


On Tue, Jul 28, 2015 at 8:27 AM, David Thompson <david.thompson at kitware.com>
wrote:

> Another project I work on has been using Bandit[1] to good effect.
>
>         David
>
> [1]:http://banditcpp.org/reference.html
>
> On Jul 28, 2015, at 10:01 AM, David Cole via vtk-developers <
> vtk-developers at vtk.org> wrote:
>
> > A single header file unit testing solution sounds like a good thing.
> >
> > ... but ... seems like we could also take advantage of a
> > well-established generally used unit testing framework (like gtest or
> > CppUnit) just as easily, and not clutter the VTK source with
> > yet-another-custom-thing-to-learn-about-VTKs-infrastructure.
> >
> > Would it be just as easy to add unit testing using an external unit
> > testing package? Or are there things about that scenario that are
> > overly complicated that having our own makes simpler...?
> >
> >
> > David C.
> >
> >
> >
> > On Mon, Jul 27, 2015 at 5:25 PM, David Gobbi <david.gobbi at gmail.com>
> wrote:
> >> Hi All,
> >>
> >> I've always enjoyed using the python unit testing framework in
> "vtk.test".
> >> It's been brought up on the list before, but it would be nice if VTK
> >> included a unit test framework for C++, as well.
> >>
> >> For my work projects, I've been using a unit test header that I wrote a
> year
> >> and a half ago:
> >> https://github.com/dgobbi/UnitTest/blob/master/UnitTest.h
> >>
> >> It's a single header file that provides a collection of macros for
> building
> >> unit tests, it's meant to be innocuous and easy to use.  It could go
> into
> >> VTK as Testing/Core/vtkUnitTest.h and people could use it at their
> leisure.
> >>
> >> Any thoughts?
> >>
> >> - David
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150728/6f7b0c60/attachment.html>


More information about the vtk-developers mailing list