Overload assert in coverage mode

to avoid polluting the report with untaken branch by the assert macro.
This commit is contained in:
Patrick Pelissier committed 2023-04-05 22:22:01 +02:00
1 parent 48260ac2a6
commit a6993ab758
1 file changed
+8
+8
View File
@@ -150,6 +150,14 @@
#undef M_CHECK_DEFAULT_TYPE
#undef M_CHECK_SAME
#undef isspace
#elif defined(BUILD_COVERAGE)
// Overload assert to avoid polluting final branch coverage
// No need to provide debug outputs. Just abort in case of error.
#undef assert
static void assert(int cond)
{
if (!cond) abort();
}
#else
/* For normal builds, empty macros which does nothing */
#define START_COVERAGE