aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-10-14 21:28:24 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-10-14 21:28:24 +0300
commit9137f385af0fe619a310b25be82ddfe3c6ae37e2 (patch)
tree031dc2ac372594f37996afbee9363eda0cad1234
parente729667b0f34a39ce4a61339843af4154648667b (diff)
Fortify tests against NDEBUG
-rw-r--r--tests/parser/driver.cxx8
-rw-r--r--tests/roundtrip/driver.cxx4
-rw-r--r--tests/serializer/driver.cxx8
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 <string>
#include <vector>
-#include <cassert>
#include <iostream>
#include <sstream>
#include <libstudxml/parser.hxx>
+#undef NDEBUG
+#include <cassert>
+
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 <string>
#include <fstream>
-#include <cassert>
#include <iostream>
#include <libstudxml/parser.hxx>
#include <libstudxml/serializer.hxx>
+#undef NDEBUG
+#include <cassert>
+
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 <string>
-#include <cassert>
#include <iostream>
#include <sstream>
#include <libstudxml/serializer.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace xml;