Commit 3b72df82 authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Don't use EXPECT_DEATH directly, it's not supported on some platforms

Instead, use EXPECT_CHECK_DEATH, which checks the right macros to know if it's
supported or not.

Bug: 1068477
Change-Id: I88c56ff59d7cb68c7f74acaa02d0e6fa06376d8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2140353
Auto-Submit: Hans Wennborg <hans@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757197}
parent bcc93230
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/strings/string_piece.h" #include "base/strings/string_piece.h"
#include "base/test/gtest_util.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -56,7 +57,7 @@ class ScopedCheckExpectation { ...@@ -56,7 +57,7 @@ class ScopedCheckExpectation {
#if defined(OFFICIAL_BUILD) && defined(NDEBUG) #if defined(OFFICIAL_BUILD) && defined(NDEBUG)
#define EXPECT_CHECK(msg, check_expr) \ #define EXPECT_CHECK(msg, check_expr) \
do { \ do { \
EXPECT_DEATH(check_expr, ""); \ EXPECT_CHECK_DEATH(check_expr); \
} while (0) } while (0)
#else #else
#define EXPECT_CHECK(msg, check_expr) \ #define EXPECT_CHECK(msg, check_expr) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment