about summary refs log tree commit diff
path: root/absl/base/internal/exception_testing.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/base/internal/exception_testing.h')
-rw-r--r--absl/base/internal/exception_testing.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/absl/base/internal/exception_testing.h b/absl/base/internal/exception_testing.h
index 07d7e8ee1ba6..fd89a3f6268f 100644
--- a/absl/base/internal/exception_testing.h
+++ b/absl/base/internal/exception_testing.h
@@ -28,8 +28,12 @@
 #define ABSL_BASE_INTERNAL_EXPECT_FAIL(expr, exception_t, text) \
   EXPECT_THROW(expr, exception_t)
 
+#elif defined(__ANDROID__)
+// Android asserts do not log anywhere that gtest can currently inspect.
+// So we expect exit, but cannot match the message.
+#define ABSL_BASE_INTERNAL_EXPECT_FAIL(expr, exception_t, text) \
+  EXPECT_DEATH(expr, ".*")
 #else
-
 #define ABSL_BASE_INTERNAL_EXPECT_FAIL(expr, exception_t, text) \
   EXPECT_DEATH(expr, text)