summaryrefslogtreecommitdiff
path: root/absl/debugging/leak_check_test.cc
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2021-03-23 15:07:11 -0700
committerGravatar Derek Mauro <dmauro@google.com>2021-03-24 08:58:27 -0400
commit1fdbe1ea1b8c835c11ed6fbec4d4259ad104f765 (patch)
tree4305af57d1416a50cb06522554569a7c9f7bf995 /absl/debugging/leak_check_test.cc
parentf3eff479834e579111e195d8f9245050a4488eed (diff)
Export of internal Abseil changes
-- 4b566a7deeba5db473c83f4924c1d182a002779f by Abseil Team <absl-team@google.com>: Add absl::LeakCheckerIsActive to check whether a leak checker is built into the target and enabled. For LeakSanitizer, it is by default enabled unless __lsan_is_turned_off() is defined and returns true. PiperOrigin-RevId: 364654465 -- 0a56ff5310b66f9d1ff5e5e2a053335ecfb5c75b by Abseil Team <absl-team@google.com>: Update absl::FromTM documentation to reflect implementation. PiperOrigin-RevId: 364388743 GitOrigin-RevId: 4b566a7deeba5db473c83f4924c1d182a002779f Change-Id: I8df35b761b532e79d620f484153083c3499ef55b
Diffstat (limited to 'absl/debugging/leak_check_test.cc')
-rw-r--r--absl/debugging/leak_check_test.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/absl/debugging/leak_check_test.cc b/absl/debugging/leak_check_test.cc
index b5cc4874..9fcfc8e5 100644
--- a/absl/debugging/leak_check_test.cc
+++ b/absl/debugging/leak_check_test.cc
@@ -23,8 +23,10 @@ namespace {
TEST(LeakCheckTest, DetectLeakSanitizer) {
#ifdef ABSL_EXPECT_LEAK_SANITIZER
EXPECT_TRUE(absl::HaveLeakSanitizer());
+ EXPECT_TRUE(absl::LeakCheckerIsActive());
#else
EXPECT_FALSE(absl::HaveLeakSanitizer());
+ EXPECT_FALSE(absl::LeakCheckerIsActive());
#endif
}