[libunwind] undef NDEBUG for assert.h in tests.
This makes sure the assertions also get verified in optimized builds.
This matches what is already done in bad_unwind_info.pass.cpp.
Reviewed By: #libunwind, MaskRay
Differential Revision: https://reviews.llvm.org/D131210
GitOrigin-RevId: fc6a6ee507ec2df0df7d34ba19feccb776297e4c
diff --git a/test/forceunwind.pass.cpp b/test/forceunwind.pass.cpp
index af5f234..8c26551 100644
--- a/test/forceunwind.pass.cpp
+++ b/test/forceunwind.pass.cpp
@@ -15,6 +15,7 @@
// Basic test for _Unwind_ForcedUnwind.
// See libcxxabi/test/forced_unwind* tests too.
+#undef NDEBUG
#include <assert.h>
#include <dlfcn.h>
#include <signal.h>
diff --git a/test/libunwind_02.pass.cpp b/test/libunwind_02.pass.cpp
index c0d6b05..fc03437 100644
--- a/test/libunwind_02.pass.cpp
+++ b/test/libunwind_02.pass.cpp
@@ -10,6 +10,7 @@
// TODO: Figure out why this fails with Memory Sanitizer.
// XFAIL: msan
+#undef NDEBUG
#include <assert.h>
#include <stdlib.h>
#include <unwind.h>
diff --git a/test/signal_frame.pass.cpp b/test/signal_frame.pass.cpp
index b17804e..482481d 100644
--- a/test/signal_frame.pass.cpp
+++ b/test/signal_frame.pass.cpp
@@ -21,6 +21,7 @@
// are necessary to run this test.
// UNSUPPORTED: target=powerpc{{(64)?}}-ibm-aix
+#undef NDEBUG
#include <assert.h>
#include <stdlib.h>
#include <libunwind.h>
diff --git a/test/signal_unwind.pass.cpp b/test/signal_unwind.pass.cpp
index 2ff50ab..e6a53ab 100644
--- a/test/signal_unwind.pass.cpp
+++ b/test/signal_unwind.pass.cpp
@@ -13,6 +13,7 @@
// TODO: Figure out why this fails with Memory Sanitizer.
// XFAIL: msan
+#undef NDEBUG
#include <assert.h>
#include <dlfcn.h>
#include <signal.h>
diff --git a/test/unw_getcontext.pass.cpp b/test/unw_getcontext.pass.cpp
index 7e2735e..95ffcf1 100644
--- a/test/unw_getcontext.pass.cpp
+++ b/test/unw_getcontext.pass.cpp
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#undef NDEBUG
#include <assert.h>
#include <libunwind.h>
diff --git a/test/unwind_leaffunction.pass.cpp b/test/unwind_leaffunction.pass.cpp
index f363dfe..31c2254 100644
--- a/test/unwind_leaffunction.pass.cpp
+++ b/test/unwind_leaffunction.pass.cpp
@@ -13,6 +13,7 @@
// TODO: Figure out why this fails with Memory Sanitizer.
// XFAIL: msan
+#undef NDEBUG
#include <assert.h>
#include <dlfcn.h>
#include <signal.h>