From 79a99cfca1223aa1f17ceed0ab2fd5de16108b5b Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 14 Oct 2021 21:16:00 +0300 Subject: Fortify tests against NDEBUG --- tests/compiler/cxx-indenter/driver.cxx | 3 +++ tests/compiler/sloc-counter/driver.cxx | 4 +++- tests/compiler/sloc-counter/test.cxx | 5 ++++- tests/compiler/traversal/driver.cxx | 3 +++ tests/container/multi-index/driver.cxx | 4 +++- tests/fs/path/driver.cxx | 4 +++- tests/re/driver.cxx | 4 +++- tests/shared-ptr/driver.cxx | 4 +++- 8 files changed, 25 insertions(+), 6 deletions(-) diff --git a/tests/compiler/cxx-indenter/driver.cxx b/tests/compiler/cxx-indenter/driver.cxx index c73aa8d..a0e8be2 100644 --- a/tests/compiler/cxx-indenter/driver.cxx +++ b/tests/compiler/cxx-indenter/driver.cxx @@ -7,6 +7,9 @@ #include #include +#undef NDEBUG +#include + using namespace std; using namespace cutl::compiler; diff --git a/tests/compiler/sloc-counter/driver.cxx b/tests/compiler/sloc-counter/driver.cxx index c85c571..b888d42 100644 --- a/tests/compiler/sloc-counter/driver.cxx +++ b/tests/compiler/sloc-counter/driver.cxx @@ -3,12 +3,14 @@ #include #include -#include #include #include #include +#undef NDEBUG +#include + using namespace std; using namespace cutl::compiler; diff --git a/tests/compiler/sloc-counter/test.cxx b/tests/compiler/sloc-counter/test.cxx index ff0f5b2..70201ee 100644 --- a/tests/compiler/sloc-counter/test.cxx +++ b/tests/compiler/sloc-counter/test.cxx @@ -12,6 +12,9 @@ #include +#undef NDEBUG +#include + char str[] = "multi\ line\ string\ @@ -25,7 +28,7 @@ int main( char* argv[] /*array*/) { /* comment start */ int x = 0; - char* s = + char* s = /* comment start */"foo"; int y = 2 /* tricky stuff *// diff --git a/tests/compiler/traversal/driver.cxx b/tests/compiler/traversal/driver.cxx index e7948f5..f8b0c84 100644 --- a/tests/compiler/traversal/driver.cxx +++ b/tests/compiler/traversal/driver.cxx @@ -9,6 +9,9 @@ #include #include +#undef NDEBUG +#include + using namespace std; using namespace cutl; diff --git a/tests/container/multi-index/driver.cxx b/tests/container/multi-index/driver.cxx index 6d4aa50..0fc642a 100644 --- a/tests/container/multi-index/driver.cxx +++ b/tests/container/multi-index/driver.cxx @@ -4,11 +4,13 @@ #include #include #include -#include #include #include +#undef NDEBUG +#include + using namespace std; using namespace cutl::container; diff --git a/tests/fs/path/driver.cxx b/tests/fs/path/driver.cxx index ca1f2b6..75276d5 100644 --- a/tests/fs/path/driver.cxx +++ b/tests/fs/path/driver.cxx @@ -1,11 +1,13 @@ // file : tests/fs/path/driver.cxx // license : MIT; see accompanying LICENSE file -#include #include #include +#undef NDEBUG +#include + using std::cerr; using std::endl; diff --git a/tests/re/driver.cxx b/tests/re/driver.cxx index bfa0e05..f82c750 100644 --- a/tests/re/driver.cxx +++ b/tests/re/driver.cxx @@ -2,11 +2,13 @@ // license : MIT; see accompanying LICENSE file #include -#include #include #include +#undef NDEBUG +#include + using namespace cutl::re; int diff --git a/tests/shared-ptr/driver.cxx b/tests/shared-ptr/driver.cxx index 4b184ac..42d4a55 100644 --- a/tests/shared-ptr/driver.cxx +++ b/tests/shared-ptr/driver.cxx @@ -2,10 +2,12 @@ // license : MIT; see accompanying LICENSE file #include -#include #include +#undef NDEBUG +#include + using namespace cutl; struct type -- cgit v1.1