net/http2/decoder/payload_decoders/ping_payload_decoder_test.cc
// Confirm we get an error if the payload is not the correct size to hold
// exactly one Http2PingFields.
Confirm we get an error if the payload is not the correct size to hold
exactly one Http2PingFields.
Confirm we get an error if the payload is not the correct size to hold exactly one Http2PingFields .
TEST_F(PingPayloadDecoderTest, WrongSize) {
  auto approve_size = [](size_t size) {
    return size != Http2PingFields::EncodedSize();
  };
  Http2FrameBuilder fb;
  fb.Append(RandPingFields());
  fb.Append(RandPingFields());
  fb.Append(RandPingFields());
  EXPECT_TRUE(VerifyDetectsFrameSizeError(0, fb.buffer(), approve_size));
}
TEST_F ( PingPayloadDecoderTest , WrongSize ) { auto approve_size = [ ] ( size_t size ) { return size != Http2PingFields :: EncodedSize ( ) ; } ; Http2FrameBuilder fb ; fb . Append ( RandPingFields ( ) ) ; fb . Append ( RandPingFields ( ) ) ; fb . Append ( RandPingFields ( ) ) ; EXPECT_TRUE ( VerifyDetectsFrameSizeError ( 0 , fb . buffer ( ) , approve_size ) ) ; }
Confirm we get an error if the payload is not the correct size to hold
exactly one Http2PingFields.
Confirm we get an error if the payload is not the correct size to hold exactly one Http2PingFields .