[Dune] unreached headers in DUNE

Oliver Sander sander at mi.fu-berlin.de
Wed Dec 21 14:55:49 CET 2011


Am 21.12.2011 14:37, schrieb Christian Engwer:
>>>> IMHO Removing unreached headers might be dangerous.
>>> I agree. I was not suggesting to remove them without any further
>>> consideration. I only wanted to mention that there are files which are
>>> not being tested in the core modules themselves. If you are fine with
>>> that, I am totally happy for you. IMHO of course.
>>>
>>
>> You are right.  Any API file provided by a module should be tested
>> in that module, even if not used anywhere else.  I am afraid though
>> that I cannot say here much more than 'patches are welcome'.
>
> The major problem is that we are talking about C++&  templates. This
> means that the usual coverage analysis doesn't work, as each code
> snippet can produce substatially different results depending on the
> template parameters. This means we can do hardly more than syntax
> checks by including the code some where.

True, but a unit test for a header can be interpreted as a statement
"this header is here for a reason".


>
> While it is good to see which files are included already, it is not as
> bad as expected if a file is not included from a cc file. We have the
> "make headercheck" target to run test against all headers. This means,
> that a dummy cc file is generated during the test which includes the
> header.
>
> Just as a bit of additional information...
>
> Christian
>




More information about the Dune mailing list