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/json.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'libtests/json.cc') diff --git a/libtests/json.cc b/libtests/json.cc index 43f2b3c6..3844222f 100644 --- a/libtests/json.cc +++ b/libtests/json.cc @@ -1,13 +1,9 @@ +#include + #include #include #include -#ifdef NDEBUG -// We need assert even in a release build for test code. -# undef NDEBUG -#endif -#include - static void check(JSON const& j, std::string const& exp) { -- cgit v1.2.3-54-g00ecf