aboutsummaryrefslogtreecommitdiffstats
path: root/libtests/qutil.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-03-07 14:46:53 +0100
committerJay Berkenbilt <ejb@ql.org>2022-03-07 16:07:27 +0100
commit17c0e38c8efa7882f8e6a13c6030edf3e768257c (patch)
tree12e4a483fa885fdf55998d4ead5200da293a4829 /libtests/qutil.cc
parent066efb69aec4aa1a62ecf56902a5f4f3d2c73bd5 (diff)
downloadqpdf-17c0e38c8efa7882f8e6a13c6030edf3e768257c.tar.zst
Force assert to be defined in test code
Diffstat (limited to 'libtests/qutil.cc')
-rw-r--r--libtests/qutil.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/libtests/qutil.cc b/libtests/qutil.cc
index b9b7c674..c3a9b163 100644
--- a/libtests/qutil.cc
+++ b/libtests/qutil.cc
@@ -9,7 +9,6 @@
#include <qpdf/Pl_Buffer.hh>
#include <string.h>
#include <limits.h>
-#include <assert.h>
#include <fstream>
#include <locale>
@@ -19,6 +18,12 @@
# include <unistd.h>
#endif
+#ifdef NDEBUG
+// We need assert even in a release build for test code.
+# undef NDEBUG
+#endif
+#include <cassert>
+
template <class int_T>
void test_to_number(char const* str, int_T wanted, bool error,
int_T (*fn)(char const*))