Best-practise currently for testing internal parts of libs? *_TEST_EXPORT macro?

Friedrich W. H. Kossebau kossebau at kde.org
Thu Sep 3 01:00:39 BST 2015


Am Mittwoch, 2. September 2015, 11:20:19 schrieb David Faure:
> On Monday 31 August 2015 14:41:00 Friedrich W. H. Kossebau wrote:
> > The only place lxr.kde.org pointed out to use the *TEST_EXPORT approach
> > was
> > grantlee, which simply creates a separate file with the define that then
> > is
> > appended to the file generated with generate_export_header:
> > http://lxr.kde.org/source/grantlee/templates/lib/CMakeLists.txt
> 
> Konqueror has a simpler approach, a file that includes the generated file
> and adds the tests_export macro on top.

That might be less fragile than the grantlee approach, thanks for pointing to 
that solution :)

Though has the small beauty disadvantage that this needs both the generated 
and that wrapping export header to be installed. But no show-stopper. Will be 
strongly considered.

((While the set of Calligra libs are not yet stable and thus not promoted for 
use by 3rd-party, that is to change in the near future step-by-step, with kdb, 
kproperty and kreport even in separate repos and spearheading that move.
So our problem also needs to cover the headers that are installed.))

Cheers
Friedrich




More information about the kde-core-devel mailing list