[vtk-developers] VTK Code Coverage

David Doria daviddoria at gmail.com
Tue Sep 18 17:34:53 EDT 2012


On Tue, Sep 18, 2012 at 4:23 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Folks,
>
> I mentioned earlier that my Fall/Winter VTK project is improving code
> coverage.
>
> I'm starting with some low hanging fruit, namely Common/Core which has 19
> files flagged by cdash as low coverage:
> http://open.cdash.org/viewCoverage.php?buildid=2568829
>
> For example I just pushed this topic to gerrit that addresses testing for
> vtkTimePointUtilities, a class that has 0 coverage. I'm pretty sure there
> are bugs in this code, mainly surrounding boundary conditions that would not
> affect its usage, whatever that may be.
> http://review.source.kitware.com/#/t/1295/
>
> But rather than rant, I'll ask the community to review the gerrit topics.
>
> Bill

This sounds like a great project.

If you are going to be adding tons of tests, can we discuss a
standardized format for them? The current method of putting everything
in Test[TestName]() seems very error prone (accidental use of
previously defined variables, name clashes, etc) and is definitely
hard to read. I have pushed a new patch set that breaks some things
out into functions. Is there any problem with doing it like this? It
seems much more readable to me. In this case these functions are all
void (because the content doesn't get checked for failure anyway), but
of course they could return 'int' so that 'return EXIT_SUCCESS' could
be ANDed with the other tests to produce the final test return value.

Thoughts?

David



More information about the vtk-developers mailing list