In my code there are some assert
calls to ensure that my functions are working properly, and to do some invariant-tests for datastructures.
Sometimes I use functions in the argument of assert
and this functions then are in Doxygens callgraph of that function. For some bigger invarianttests this really polutes the graph…
How can I avoid that list_isSorted
in the following snippet occurs in the callgraph?
int list_isElem (List l, Element e) {
assert(list_isSorted(l));
{
if (list_isEmpty(l)) { return 0; }
switch (compare(e, list_getValue(l))) {
case -1: return 0;
case 0: return 1;
case 1: return list_isElem (list_getTail(l), e);
default: exit(ERR_UNKNOWN);
}
}
}
I already tried to set PREDEFINED = NDEBUG
in Doxyfile, but that did not work.
just skip the assert?
see hhttp://www.doxygen.nl/manual/faq.html
"The new and easiest way is to add one comment block with a \cond command at the start and one comment block with a \endcond"
automate it with a macro:
#define DAssert(x) /** \cond */ assert(x) /** \endcond */
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With