aboutsummaryrefslogtreecommitdiffstats
path: root/libtests/cxx11.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/cxx11.cc
parent066efb69aec4aa1a62ecf56902a5f4f3d2c73bd5 (diff)
downloadqpdf-17c0e38c8efa7882f8e6a13c6030edf3e768257c.tar.zst
Force assert to be defined in test code
Diffstat (limited to 'libtests/cxx11.cc')
-rw-r--r--libtests/cxx11.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/libtests/cxx11.cc b/libtests/cxx11.cc
index bc14b5c0..5ad3e6ed 100644
--- a/libtests/cxx11.cc
+++ b/libtests/cxx11.cc
@@ -1,5 +1,4 @@
#include <iostream>
-#include <cassert>
#include <cstring>
#include <cstdlib>
#include <functional>
@@ -10,6 +9,12 @@
#include <memory>
#include <regex>
+#ifdef NDEBUG
+// We need assert even in a release build for test code.
+# undef NDEBUG
+#endif
+#include <cassert>
+
// Functional programming
// Function that returns a callable in the form of a lambda