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/buffer.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'libtests/buffer.cc') diff --git a/libtests/buffer.cc b/libtests/buffer.cc index a24c0f99..a65efb1c 100644 --- a/libtests/buffer.cc +++ b/libtests/buffer.cc @@ -1,3 +1,5 @@ +#include + #include #include #include @@ -7,12 +9,6 @@ #include #include -#ifdef NDEBUG -// We need assert even in a release build for test code. -# undef NDEBUG -#endif -#include - static unsigned char* uc(char const* s) { -- cgit v1.2.3-54-g00ecf