Enforced CGAL_NDEBUG rule:
- code under include/CGAL/ and src/ must not use NDEBUG and assert(), but CGAL_NDEBUG and CGAL assertion macros.
- code under demo/, examples/ and test/ must use NDEBUG and assert().
- there is a clear distinction between internal errors (aka bugs) and not supported input files (typically models which are not topological discs),
- internal errors trigger a test suite failure.
The main consequence is that OpenNL errors trigger now a test suite failure.
in order to catch input meshes that do not respect them and avoid crashes in Release mode:
- For fixed border parameterizations:
Preconditions:
check that the border is mapped onto a convex polygon.
check that the input mesh is triangular (expensive check).
check that the input mesh is a surface with one connected component (expensive check).
Postconditions:
check one-to-one mapping.
- For free border parameterizations:
Preconditions:
check that the input mesh is triangular (expensive check).
check that the input mesh is a surface with one connected component (expensive check).
Postconditions:
check one-to-one mapping.
Things like "CGAL_assertion(denominator != 0)" produced assertion failures for no gain.
So now, the assertion is triggered only if the condition is certain, using CGAL::certainly().
That is, change the following in all assertion files :
((EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
to :
(CGAL::certainly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
as the default is now the empty string "".
It should fix the problem that we have lost the assertion messages
(seeing "what(): basic_string::_S_construct NULL not valid" instead),
for packages that use package-specific assertion macros.
* CGAL_error to CGAL_error_msg
* introduced a macro CGAL_error()
* added some words about CGAL_error to the developers manual
* renamed most of assert(x) into CGAL_assertion(x)
* renamed exit(x) with x != 0 , CGAL_assertion(false) and assert(false) into CGAL_error
* CORE left untouched, OpenNL changed