aboutsummaryrefslogtreecommitdiffstats
path: root/libtests/arg_parser.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-03 14:21:01 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-04 00:31:22 +0200
commit62bf296a9c0f5be492f0677ed111b3fa217f4c11 (patch)
treef49564b3d70a12ee4e16e84c4e4e33a2adce1133 /libtests/arg_parser.cc
parent92b692466f7a4dbf4e51e6a77713c029a3e18ab1 (diff)
downloadqpdf-62bf296a9c0f5be492f0677ed111b3fa217f4c11.tar.zst
Make assert handling less error-prone
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.
Diffstat (limited to 'libtests/arg_parser.cc')
-rw-r--r--libtests/arg_parser.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/libtests/arg_parser.cc b/libtests/arg_parser.cc
index 8b4d556a..1480a717 100644
--- a/libtests/arg_parser.cc
+++ b/libtests/arg_parser.cc
@@ -1,15 +1,11 @@
+#include <qpdf/assert_test.h>
+
#include <qpdf/QPDFArgParser.hh>
#include <qpdf/QPDFUsage.hh>
#include <qpdf/QUtil.hh>
#include <cstring>
#include <iostream>
-#ifdef NDEBUG
-// We need assert even in a release build for test code.
-# undef NDEBUG
-#endif
-#include <cassert>
-
class ArgParser
{
public: