s/EXPECT_DEBUG_DEATH/EXPECT_QUICHE_DEBUG_DEATH/ in third_party/http2.
My goal is to restore the overrides to not crash on CHECK failures and GFE_BUG
otherwise in tests, at
http://google3/net/quic/platform_overrides/quiche_platform_impl/quiche_test_impl.h;l=201-202;rcl=444726292
(these are currently unused). EXPECT_QUICHE_DEBUG_DEATH correctly overrides the
overrides, so this CL is a prerequisite for the overrides.
PiperOrigin-RevId: 449243800
diff --git a/quiche/http2/decoder/decode_buffer_test.cc b/quiche/http2/decoder/decode_buffer_test.cc
index 7485dac..0149062 100644
--- a/quiche/http2/decoder/decode_buffer_test.cc
+++ b/quiche/http2/decoder/decode_buffer_test.cc
@@ -124,12 +124,12 @@
// Make sure that DecodeBuffer ctor complains about bad args.
#if GTEST_HAS_DEATH_TEST && !defined(NDEBUG)
TEST(DecodeBufferDeathTest, NonNullBufferRequired) {
- EXPECT_DEBUG_DEATH({ DecodeBuffer b(nullptr, 3); }, "nullptr");
+ EXPECT_QUICHE_DEBUG_DEATH({ DecodeBuffer b(nullptr, 3); }, "nullptr");
}
// Make sure that DecodeBuffer ctor complains about bad args.
TEST(DecodeBufferDeathTest, ModestBufferSizeRequired) {
- EXPECT_DEBUG_DEATH(
+ EXPECT_QUICHE_DEBUG_DEATH(
{
// This depends on being able to allocate a fairly large array on the
// stack. If that fails, we can instead do this:
@@ -152,7 +152,7 @@
b.AdvanceCursor(3); // OK
EXPECT_TRUE(b.Empty());
}
- EXPECT_DEBUG_DEATH(
+ EXPECT_QUICHE_DEBUG_DEATH(
{
// Going beyond is not OK.
const char data[] = "abc";
@@ -168,7 +168,7 @@
DecodeBuffer b(data, sizeof data);
EXPECT_EQ(2u, b.FullSize());
EXPECT_EQ(0x1223, b.DecodeUInt16());
- EXPECT_DEBUG_DEATH({ b.DecodeUInt8(); }, "1 vs. 0");
+ EXPECT_QUICHE_DEBUG_DEATH({ b.DecodeUInt8(); }, "1 vs. 0");
}
// Make sure that DecodeBuffer detects decode beyond end, in debug mode.
@@ -177,7 +177,7 @@
DecodeBuffer b(data, sizeof data);
EXPECT_EQ(3u, b.FullSize());
EXPECT_EQ(0x1223, b.DecodeUInt16());
- EXPECT_DEBUG_DEATH({ b.DecodeUInt16(); }, "2 vs. 1");
+ EXPECT_QUICHE_DEBUG_DEATH({ b.DecodeUInt16(); }, "2 vs. 1");
}
// Make sure that DecodeBuffer doesn't agree with having two subsets.
@@ -185,8 +185,8 @@
const char data[] = "abc";
DecodeBuffer base(data, 3);
DecodeBufferSubset subset1(&base, 1);
- EXPECT_DEBUG_DEATH({ DecodeBufferSubset subset2(&base, 1); },
- "There is already a subset");
+ EXPECT_QUICHE_DEBUG_DEATH({ DecodeBufferSubset subset2(&base, 1); },
+ "There is already a subset");
}
// Make sure that DecodeBufferSubset notices when the base's cursor has moved.
@@ -194,7 +194,7 @@
const char data[] = "abc";
DecodeBuffer base(data, 3);
base.AdvanceCursor(1);
- EXPECT_DEBUG_DEATH(
+ EXPECT_QUICHE_DEBUG_DEATH(
{
DecodeBufferSubset subset1(&base, 2);
base.AdvanceCursor(1);
diff --git a/quiche/http2/http2_structures_test.cc b/quiche/http2/http2_structures_test.cc
index 43510ef..5f63e4c 100644
--- a/quiche/http2/http2_structures_test.cc
+++ b/quiche/http2/http2_structures_test.cc
@@ -106,8 +106,9 @@
} while (frame_type++ != 255);
#if GTEST_HAS_DEATH_TEST && !defined(NDEBUG)
- EXPECT_DEBUG_DEATH(Http2FrameHeader(0x01000000, Http2FrameType::DATA, 0, 1),
- "payload_length");
+ EXPECT_QUICHE_DEBUG_DEATH(
+ Http2FrameHeader(0x01000000, Http2FrameType::DATA, 0, 1),
+ "payload_length");
#endif // GTEST_HAS_DEATH_TEST && !defined(NDEBUG)
}
@@ -158,8 +159,8 @@
return absl::StrCat(Http2FrameTypeToString(type), static_cast<int>(flags));
}
-// The tests of the valid frame types include EXPECT_DEBUG_DEATH, which is
-// quite slow, so using value parameterized tests in order to allow sharding.
+// The tests of the valid frame types include EXPECT_QUICHE_DEBUG_DEATH, which
+// is quite slow, so using value parameterized tests in order to allow sharding.
class Http2FrameHeaderTypeAndFlagTest : public QuicheTestWithParam<TestParams> {
protected:
Http2FrameHeaderTypeAndFlagTest()
@@ -207,7 +208,7 @@
}
break;
default:
- EXPECT_DEBUG_DEATH(v.IsEndStream(), "DATA.*HEADERS") << v;
+ EXPECT_QUICHE_DEBUG_DEATH(v.IsEndStream(), "DATA.*HEADERS");
}
}
@@ -244,7 +245,7 @@
}
break;
default:
- EXPECT_DEBUG_DEATH(v.IsAck(), "SETTINGS.*PING") << v;
+ EXPECT_QUICHE_DEBUG_DEATH(v.IsAck(), "SETTINGS.*PING");
}
}
@@ -283,9 +284,8 @@
}
break;
default:
- EXPECT_DEBUG_DEATH(v.IsEndHeaders(),
- "HEADERS.*PUSH_PROMISE.*CONTINUATION")
- << v;
+ EXPECT_QUICHE_DEBUG_DEATH(v.IsEndHeaders(),
+ "HEADERS.*PUSH_PROMISE.*CONTINUATION");
}
}
@@ -324,7 +324,7 @@
}
break;
default:
- EXPECT_DEBUG_DEATH(v.IsPadded(), "DATA.*HEADERS.*PUSH_PROMISE") << v;
+ EXPECT_QUICHE_DEBUG_DEATH(v.IsPadded(), "DATA.*HEADERS.*PUSH_PROMISE");
}
}
@@ -361,7 +361,7 @@
}
break;
default:
- EXPECT_DEBUG_DEATH(v.HasPriority(), "HEADERS") << v;
+ EXPECT_QUICHE_DEBUG_DEATH(v.HasPriority(), "HEADERS");
}
}
@@ -378,14 +378,14 @@
EXPECT_EQ(is_exclusive, v.is_exclusive);
// The high-bit must not be set on the stream id.
- EXPECT_DEBUG_DEATH(
+ EXPECT_QUICHE_DEBUG_DEATH(
Http2PriorityFields(stream_dependency | 0x80000000, weight, is_exclusive),
"31-bit");
// The weight must be in the range 1-256.
- EXPECT_DEBUG_DEATH(Http2PriorityFields(stream_dependency, 0, is_exclusive),
- "too small");
- EXPECT_DEBUG_DEATH(
+ EXPECT_QUICHE_DEBUG_DEATH(
+ Http2PriorityFields(stream_dependency, 0, is_exclusive), "too small");
+ EXPECT_QUICHE_DEBUG_DEATH(
Http2PriorityFields(stream_dependency, weight + 256, is_exclusive),
"too large");