#include "quiche/quic/core/quic_data_writer.h"
#include <cstdint>
#include <cstring>
#include <string>
#include <vector>
#include "absl/base/macros.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "quiche/quic/core/quic_connection_id.h"
#include "quiche/quic/core/quic_data_reader.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/quic/core/quic_utils.h"
#include "quiche/quic/platform/api/quic_expect_bug.h"
#include "quiche/quic/platform/api/quic_flags.h"
#include "quiche/quic/platform/api/quic_test.h"
#include "quiche/quic/test_tools/quic_test_utils.h"
#include "quiche/common/quiche_endian.h"
#include "quiche/common/test_tools/quiche_test_utils.h"
namespace quic {
namespace test {
namespace {
char* AsChars(unsigned char* data) { … }
struct TestParams { … };
std::string PrintToString(const TestParams& p) { … }
std::vector<TestParams> GetTestParams() { … }
class QuicDataWriterTest : public QuicTestWithParam<TestParams> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(QuicDataWriterTest, SanityCheckUFloat16Consts) { … }
TEST_P(QuicDataWriterTest, WriteUFloat16) { … }
TEST_P(QuicDataWriterTest, ReadUFloat16) { … }
TEST_P(QuicDataWriterTest, RoundTripUFloat16) { … }
TEST_P(QuicDataWriterTest, WriteConnectionId) { … }
TEST_P(QuicDataWriterTest, LengthPrefixedConnectionId) { … }
TEST_P(QuicDataWriterTest, EmptyConnectionIds) { … }
TEST_P(QuicDataWriterTest, WriteTag) { … }
TEST_P(QuicDataWriterTest, Write16BitUnsignedIntegers) { … }
TEST_P(QuicDataWriterTest, Write24BitUnsignedIntegers) { … }
TEST_P(QuicDataWriterTest, Write32BitUnsignedIntegers) { … }
TEST_P(QuicDataWriterTest, Write40BitUnsignedIntegers) { … }
TEST_P(QuicDataWriterTest, Write48BitUnsignedIntegers) { … }
TEST_P(QuicDataWriterTest, Write56BitUnsignedIntegers) { … }
TEST_P(QuicDataWriterTest, Write64BitUnsignedIntegers) { … }
TEST_P(QuicDataWriterTest, WriteIntegers) { … }
TEST_P(QuicDataWriterTest, WriteBytes) { … }
const int kMultiVarCount = …;
void EncodeDecodeStreamId(uint64_t value_in) { … }
TEST_P(QuicDataWriterTest, StreamId1) { … }
TEST_P(QuicDataWriterTest, WriteRandomBytes) { … }
TEST_P(QuicDataWriterTest, WriteInsecureRandomBytes) { … }
TEST_P(QuicDataWriterTest, PeekVarInt62Length) { … }
TEST_P(QuicDataWriterTest, ValidStreamCount) { … }
TEST_P(QuicDataWriterTest, Seek) { … }
TEST_P(QuicDataWriterTest, SeekTooFarFails) { … }
TEST_P(QuicDataWriterTest, PayloadReads) { … }
TEST_P(QuicDataWriterTest, StringPieceVarInt62) { … }
}
}
}