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 +++- old-tests/depdb/driver.cxx | 3 +++ old-tests/lexer/driver.cxx | 4 +++- old-tests/parser/driver.cxx | 4 +++- tests/libbuild2/driver.cxx | 3 +++ tests/test/config-test/driver.cxx | 3 +++ tests/test/script/runner/driver.cxx | 4 +++- tests/test/simple/generated/driver.cxx | 3 +++ 19 files changed, 57 insertions(+), 13 deletions(-) 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 diff --git a/old-tests/depdb/driver.cxx b/old-tests/depdb/driver.cxx index b802662..47f99af 100644 --- a/old-tests/depdb/driver.cxx +++ b/old-tests/depdb/driver.cxx @@ -10,6 +10,9 @@ #include +#undef NDEBUG +#include + using namespace std; using namespace build2; diff --git a/old-tests/lexer/driver.cxx b/old-tests/lexer/driver.cxx index 588f062..f5e47c3 100644 --- a/old-tests/lexer/driver.cxx +++ b/old-tests/lexer/driver.cxx @@ -3,13 +3,15 @@ #include #include -#include #include #include #include #include +#undef NDEBUG +#include + using namespace std; using namespace build; diff --git a/old-tests/parser/driver.cxx b/old-tests/parser/driver.cxx index a5b6820..6fb5aee 100644 --- a/old-tests/parser/driver.cxx +++ b/old-tests/parser/driver.cxx @@ -1,7 +1,6 @@ // file : tests/build/parser/driver.cxx -*- C++ -*- // license : MIT; see accompanying LICENSE file -#include #include #include @@ -14,6 +13,9 @@ #include #include +#undef NDEBUG +#include + using namespace std; using namespace build; diff --git a/tests/libbuild2/driver.cxx b/tests/libbuild2/driver.cxx index 1c4554a..9a8db9e 100644 --- a/tests/libbuild2/driver.cxx +++ b/tests/libbuild2/driver.cxx @@ -16,6 +16,9 @@ #include #include +#undef NDEBUG +#include + using namespace build2; int diff --git a/tests/test/config-test/driver.cxx b/tests/test/config-test/driver.cxx index 5902854..7ea10e7 100644 --- a/tests/test/config-test/driver.cxx +++ b/tests/test/config-test/driver.cxx @@ -3,6 +3,9 @@ #include +#undef NDEBUG +#include + using namespace std; int diff --git a/tests/test/script/runner/driver.cxx b/tests/test/script/runner/driver.cxx index f081714..d0e7601 100644 --- a/tests/test/script/runner/driver.cxx +++ b/tests/test/script/runner/driver.cxx @@ -11,7 +11,6 @@ #include // numeric_limits #include #include // abort() -#include #include // endl, *bit #include // istream::traits_type::eof() #include @@ -22,6 +21,9 @@ #include #include +#undef NDEBUG +#include + using namespace std; using namespace butl; diff --git a/tests/test/simple/generated/driver.cxx b/tests/test/simple/generated/driver.cxx index 18fd0ae..89dacca 100644 --- a/tests/test/simple/generated/driver.cxx +++ b/tests/test/simple/generated/driver.cxx @@ -12,6 +12,9 @@ #include #include +#undef NDEBUG +#include + using namespace std; // If the -s option is specified, then also sleep for 5 seconds. -- cgit v1.1