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

Bill Lorensen bill.lorensen at gmail.com
Thu Sep 20 12:08:51 EDT 2012


But, the current test framework can be used to write unit tests. It's what
we have.

Gtest could also be used. Some packages like PCL use it with ctest.


On Thu, Sep 20, 2012 at 12:06 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> I agree.
>
>
> On Thu, Sep 20, 2012 at 12:02 PM, David Gobbi <david.gobbi at gmail.com>wrote:
>
>> 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.
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120920/8af30259/attachment.html>


More information about the vtk-developers mailing list