From 62bf296a9c0f5be492f0677ed111b3fa217f4c11 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 3 May 2022 08:21:01 -0400 Subject: 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. --- libtests/qutil.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'libtests/qutil.cc') diff --git a/libtests/qutil.cc b/libtests/qutil.cc index 017f371b..f79f9a3f 100644 --- a/libtests/qutil.cc +++ b/libtests/qutil.cc @@ -1,3 +1,5 @@ +#include + #include #include #include @@ -17,12 +19,6 @@ # include #endif -#ifdef NDEBUG -// We need assert even in a release build for test code. -# undef NDEBUG -#endif -#include - template void test_to_number( -- cgit v1.2.3-54-g00ecf