Subject: Re: [geometry] [test][length] cannot compile unit test for length in develop branch
From: Menelaos Karavelas (menelaos.karavelas_at_[hidden])
Date: 2014-05-18 06:11:28
On 18/05/2014 12:01 ??, Bruno Lalande wrote:
> Hi Menelaos,
> I take it this macro is not defined by default? In which case, it's
> not very surprising. I often had problems testing variants when the
> test does debugging/visualizating stuff with
No it is not defined by default.
> the geometry itself because the metafunction it calls are obviously
> not variant aware. I'm having this problem right now with union. But I
> wasn't aware that this could also sometimes be hidden behind a macro,
> that makes things even more tricky...
This is exactly what is happening, and in this case it was hidden behind
I already fixed the issue the following way (not necessarily the best):
when GEOMETRY_TEST_DEBUG is defined, the test for variants is
re-activated. So for the purposes of Boost regression tests variants are
tested (GEOMETRY_TEST_DEBUG is not defined), but internally we can ran
with GEOMETRY_TEST_DEBUG defined, but will not test for variants).
If you have a better idea on how to handle this, let me know.
There is a related pull request:
If you agree with the fix, you may accept the PR.
P.S. Testing with -DGEOMETRY_TEST_DEBUG revealed another minor bug in
the unit test for perimeter: at some point bg::perimeter_result was
used, which (from what I saw in the code) it has been replaced by
bg::default_length_result. The fix is also part of the same PR (above).
> Geometry mailing list
Geometry list run by mateusz at loskot.net