From dec742c5fa8a8ab35b2bbe96f990a84959164f66 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 24 Sep 2021 12:31:43 +0300 Subject: Fortify tests against NDEBUG --- libbuild2/build/script/lexer.test.cxx | 4 +++- libbuild2/build/script/parser.test.cxx | 4 +++- libbuild2/cc/lexer.test.cxx | 4 +++- libbuild2/cc/parser.test.cxx | 4 +++- libbuild2/function.test.cxx | 3 +++ libbuild2/lexer.test.cxx | 4 +++- libbuild2/name.test.cxx | 4 +++- libbuild2/scheduler.test.cxx | 4 +++- libbuild2/script/lexer.test.cxx | 4 +++- libbuild2/script/regex.test.cxx | 3 +++ libbuild2/test/script/lexer.test.cxx | 4 +++- libbuild2/test/script/parser.test.cxx | 4 +++- 12 files changed, 36 insertions(+), 10 deletions(-) (limited to 'libbuild2') diff --git a/libbuild2/build/script/lexer.test.cxx b/libbuild2/build/script/lexer.test.cxx index 1c47442..e496f94 100644 --- a/libbuild2/build/script/lexer.test.cxx +++ b/libbuild2/build/script/lexer.test.cxx @@ -1,7 +1,6 @@ // file : libbuild2/build/script/lexer.test.cxx -*- C++ -*- // license : MIT; see accompanying LICENSE file -#include #include #include @@ -10,6 +9,9 @@ #include #include +#undef NDEBUG +#include + using namespace std; namespace build2 diff --git a/libbuild2/build/script/parser.test.cxx b/libbuild2/build/script/parser.test.cxx index da23564..4089efa 100644 --- a/libbuild2/build/script/parser.test.cxx +++ b/libbuild2/build/script/parser.test.cxx @@ -1,7 +1,6 @@ // file : libbuild2/build/script/parser.test.cxx -*- C++ -*- // license : MIT; see accompanying LICENSE file -#include #include #include @@ -16,6 +15,9 @@ #include #include +#undef NDEBUG +#include + using namespace std; namespace build2 diff --git a/libbuild2/cc/lexer.test.cxx b/libbuild2/cc/lexer.test.cxx index 284d592..0d7d12f 100644 --- a/libbuild2/cc/lexer.test.cxx +++ b/libbuild2/cc/lexer.test.cxx @@ -1,7 +1,6 @@ // file : libbuild2/cc/lexer.test.cxx -*- C++ -*- // license : MIT; see accompanying LICENSE file -#include #include #include @@ -9,6 +8,9 @@ #include +#undef NDEBUG +#include + using namespace std; using namespace butl; diff --git a/libbuild2/cc/parser.test.cxx b/libbuild2/cc/parser.test.cxx index 7613741..1d5930a 100644 --- a/libbuild2/cc/parser.test.cxx +++ b/libbuild2/cc/parser.test.cxx @@ -1,7 +1,6 @@ // file : libbuild2/cc/parser.test.cxx -*- C++ -*- // license : MIT; see accompanying LICENSE file -#include #include #include @@ -9,6 +8,9 @@ #include +#undef NDEBUG +#include + using namespace std; using namespace butl; diff --git a/libbuild2/function.test.cxx b/libbuild2/function.test.cxx index c64bd0a..b09e4f7 100644 --- a/libbuild2/function.test.cxx +++ b/libbuild2/function.test.cxx @@ -15,6 +15,9 @@ #include #include +#undef NDEBUG +#include + using namespace std; namespace build2 diff --git a/libbuild2/lexer.test.cxx b/libbuild2/lexer.test.cxx index 6d48885..809fcd6 100644 --- a/libbuild2/lexer.test.cxx +++ b/libbuild2/lexer.test.cxx @@ -2,7 +2,6 @@ // license : MIT; see accompanying LICENSE file #include // strtoul() -#include #include #include @@ -11,6 +10,9 @@ #include #include +#undef NDEBUG +#include + using namespace std; namespace build2 diff --git a/libbuild2/name.test.cxx b/libbuild2/name.test.cxx index 979e8ab..80b830e 100644 --- a/libbuild2/name.test.cxx +++ b/libbuild2/name.test.cxx @@ -3,7 +3,6 @@ #include -#include #include #include // Includes name. @@ -11,6 +10,9 @@ #include +#undef NDEBUG +#include + using namespace std; namespace build2 diff --git a/libbuild2/scheduler.test.cxx b/libbuild2/scheduler.test.cxx index 49d0086..b29c932 100644 --- a/libbuild2/scheduler.test.cxx +++ b/libbuild2/scheduler.test.cxx @@ -4,7 +4,6 @@ #include #include -#include #include #include @@ -12,6 +11,9 @@ #include +#undef NDEBUG +#include + using namespace std; namespace build2 diff --git a/libbuild2/script/lexer.test.cxx b/libbuild2/script/lexer.test.cxx index b8de241..1516850 100644 --- a/libbuild2/script/lexer.test.cxx +++ b/libbuild2/script/lexer.test.cxx @@ -1,7 +1,6 @@ // file : libbuild2/script/lexer.test.cxx -*- C++ -*- // license : MIT; see accompanying LICENSE file -#include #include #include @@ -10,6 +9,9 @@ #include #include +#undef NDEBUG +#include + using namespace std; namespace build2 diff --git a/libbuild2/script/regex.test.cxx b/libbuild2/script/regex.test.cxx index 36d47e1..9ec2432 100644 --- a/libbuild2/script/regex.test.cxx +++ b/libbuild2/script/regex.test.cxx @@ -6,6 +6,9 @@ #include +#undef NDEBUG +#include + using namespace std; using namespace build2::script::regex; diff --git a/libbuild2/test/script/lexer.test.cxx b/libbuild2/test/script/lexer.test.cxx index 9c64616..76f102d 100644 --- a/libbuild2/test/script/lexer.test.cxx +++ b/libbuild2/test/script/lexer.test.cxx @@ -1,7 +1,6 @@ // file : libbuild2/test/script/lexer.test.cxx -*- C++ -*- // license : MIT; see accompanying LICENSE file -#include #include #include @@ -10,6 +9,9 @@ #include #include +#undef NDEBUG +#include + using namespace std; namespace build2 diff --git a/libbuild2/test/script/parser.test.cxx b/libbuild2/test/script/parser.test.cxx index 202f368..47d56ce 100644 --- a/libbuild2/test/script/parser.test.cxx +++ b/libbuild2/test/script/parser.test.cxx @@ -1,7 +1,6 @@ // file : libbuild2/test/script/parser.test.cxx -*- C++ -*- // license : MIT; see accompanying LICENSE file -#include #include #include @@ -18,6 +17,9 @@ #include #include +#undef NDEBUG +#include + using namespace std; namespace build2 -- cgit v1.1