From 9137f385af0fe619a310b25be82ddfe3c6ae37e2 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 14 Oct 2021 21:28:24 +0300 Subject: Fortify tests against NDEBUG --- tests/parser/driver.cxx | 8 +++----- tests/roundtrip/driver.cxx | 4 +++- tests/serializer/driver.cxx | 8 +++----- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/tests/parser/driver.cxx b/tests/parser/driver.cxx index f9128ec..c4d1413 100644 --- a/tests/parser/driver.cxx +++ b/tests/parser/driver.cxx @@ -1,18 +1,16 @@ // file : tests/parser/driver.cxx // license : MIT; see accompanying LICENSE file -#ifdef NDEBUG -# error tests require enabled assert(); un-define the NDEBUG macro -#endif - #include #include -#include #include #include #include +#undef NDEBUG +#include + using namespace std; using namespace xml; diff --git a/tests/roundtrip/driver.cxx b/tests/roundtrip/driver.cxx index 02842ad..3cca872 100644 --- a/tests/roundtrip/driver.cxx +++ b/tests/roundtrip/driver.cxx @@ -3,12 +3,14 @@ #include #include -#include #include #include #include +#undef NDEBUG +#include + using namespace std; using namespace xml; diff --git a/tests/serializer/driver.cxx b/tests/serializer/driver.cxx index d427076..7c0d24a 100644 --- a/tests/serializer/driver.cxx +++ b/tests/serializer/driver.cxx @@ -1,17 +1,15 @@ // file : tests/serializer/driver.cxx // license : MIT; see accompanying LICENSE file -#ifdef NDEBUG -# error tests require enabled assert(); un-define the NDEBUG macro -#endif - #include -#include #include #include #include +#undef NDEBUG +#include + using namespace std; using namespace xml; -- cgit v1.1