mirror of
https://github.com/qpdf/qpdf.git
synced 2024-11-16 17:45:09 +00:00
62bf296a9c
Prevent my future self or other contributors from using assert in tests and then having that assert not do anything because of the NDEBUG macro.
19 lines
517 B
C
19 lines
517 B
C
/*
|
|
* Include this file to use assert in regular code for
|
|
* debugging/strong sanity checking, knowing that the assert will be
|
|
* disabled in release code. Use qpdf_assert_debug in the code.
|
|
*/
|
|
|
|
/* assert_debug and assert_test intentionally use the same
|
|
* guard. Search for assert in README-MAINTAINER.
|
|
*/
|
|
#ifdef QPDF_ASSERT_H
|
|
# error "At most one qpdf/assert header may be included at most one time"
|
|
#else
|
|
# define QPDF_ASSERT_H
|
|
|
|
# include <assert.h>
|
|
# define qpdf_assert_debug assert
|
|
|
|
#endif /* QPDF_ASSERT_H */
|