[vtk-developers] Use of std::cout in tests

David Gobbi david.gobbi at gmail.com
Thu Sep 20 12:02:44 EDT 2012


I have to say that I agree with Marcus.  Tests must check for correct
behavior.  That is really the purpose of a unit test, isn't it?

Having a test that will pass even when the results are incorrect is
bad, bad, bad.  It leads to false confidence in the code.

If we allow tests that provide full coverage and zero valgrind
defects, but which will pass when the code is giving incorrect
results, then coverage becomes a meaningless metric.

I consider an incorrect result to be a more serious defect than a segfault.

 - David


On Thu, Sep 20, 2012 at 9:41 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> But, it could segfault for have valgrind defects...  It is a form of testing
> to check for memory access and leaks.



More information about the vtk-developers mailing list