| Index: base/numerics/safe_numerics_unittest.cc
|
| diff --git a/base/numerics/safe_numerics_unittest.cc b/base/numerics/safe_numerics_unittest.cc
|
| index 4be7ab59d722a63e6cf8508f71e3e61bf097febf..b602e65a86615897067f02c7015ca88052c7e52f 100644
|
| --- a/base/numerics/safe_numerics_unittest.cc
|
| +++ b/base/numerics/safe_numerics_unittest.cc
|
| @@ -11,6 +11,7 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/numerics/safe_conversions.h"
|
| #include "base/numerics/safe_math.h"
|
| +#include "base/test/gtest_util.h"
|
| #include "build/build_config.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| @@ -650,18 +651,15 @@ TEST(SafeNumerics, CastTests) {
|
| EXPECT_EQ(0, saturated_cast<int>(not_a_number));
|
| }
|
|
|
| -#if GTEST_HAS_DEATH_TEST
|
| -
|
| TEST(SafeNumerics, SaturatedCastChecks) {
|
| float not_a_number = std::numeric_limits<float>::infinity() -
|
| std::numeric_limits<float>::infinity();
|
| EXPECT_TRUE(std::isnan(not_a_number));
|
| - EXPECT_DEATH((saturated_cast<int, base::SaturatedCastNaNBehaviorCheck>(
|
| - not_a_number)), "");
|
| + EXPECT_DCHECK_DEATH(
|
| + (saturated_cast<int, base::SaturatedCastNaNBehaviorCheck>(not_a_number)),
|
| + "");
|
| }
|
|
|
| -#endif // GTEST_HAS_DEATH_TEST
|
| -
|
| TEST(SafeNumerics, IsValueInRangeForNumericType) {
|
| EXPECT_TRUE(IsValueInRangeForNumericType<uint32_t>(0));
|
| EXPECT_TRUE(IsValueInRangeForNumericType<uint32_t>(1));
|
|
|