Adjust guard macros around PdfiumSpanDeathTest.DanglingReference. The test should successfully detect the death of the process when using e.g. BRP's danlging pointer detector. Change-Id: I844b472adb1ca3989a56922b7312100e85cf3fde Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/112415 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcrt/pdfium_span_unittest.cpp b/core/fxcrt/pdfium_span_unittest.cpp index e9da064..b1bfe7d 100644 --- a/core/fxcrt/pdfium_span_unittest.cpp +++ b/core/fxcrt/pdfium_span_unittest.cpp
@@ -4,6 +4,7 @@ #include <vector> +#include "core/fxcrt/unowned_ptr.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/base/containers/span.h" @@ -52,7 +53,7 @@ EXPECT_DEATH(empty_span.back() += 1, ".*"); } -#if defined(ADDRESS_SANITIZER) +#if defined(UNOWNED_PTR_DANGLING_CHECKS) namespace { void CreateDanglingSpan() { @@ -68,4 +69,4 @@ TEST(PdfiumSpanDeathTest, DanglingReference) { EXPECT_DEATH(CreateDanglingSpan(), ".*"); } -#endif // defined(ADDRESS_SANITIZER) +#endif // defined(UNOWNED_PTR_DANGLING_CHECKS)