chromium/net/third_party/quiche/src/quiche/http2/hpack/hpack_output_stream_test.cc

// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "quiche/http2/hpack/hpack_output_stream.h"

#include <cstdint>
#include <string>

#include "quiche/common/platform/api/quiche_test.h"

namespace spdy {

namespace {

// Make sure that AppendBits() appends bits starting from the most
// significant bit, and that it can handle crossing a byte boundary.
TEST(HpackOutputStreamTest, AppendBits) {}

// Utility function to return I as a string encoded with an N-bit
// prefix.
std::string EncodeUint32(uint8_t N, uint32_t I) {}

// The {Number}ByteIntegersEightBitPrefix tests below test that
// certain integers are encoded correctly with an 8-bit prefix in
// exactly {Number} bytes.

TEST(HpackOutputStreamTest, OneByteIntegersEightBitPrefix) {}

TEST(HpackOutputStreamTest, TwoByteIntegersEightBitPrefix) {}

TEST(HpackOutputStreamTest, ThreeByteIntegersEightBitPrefix) {}

TEST(HpackOutputStreamTest, FourByteIntegersEightBitPrefix) {}

TEST(HpackOutputStreamTest, FiveByteIntegersEightBitPrefix) {}

TEST(HpackOutputStreamTest, SixByteIntegersEightBitPrefix) {}

// The {Number}ByteIntegersOneToSevenBitPrefix tests below test that
// certain integers are encoded correctly with an N-bit prefix in
// exactly {Number} bytes for N in {1, 2, ..., 7}.

TEST(HpackOutputStreamTest, OneByteIntegersOneToSevenBitPrefixes) {}

TEST(HpackOutputStreamTest, TwoByteIntegersOneToSevenBitPrefixes) {}

TEST(HpackOutputStreamTest, ThreeByteIntegersOneToSevenBitPrefixes) {}

TEST(HpackOutputStreamTest, FourByteIntegersOneToSevenBitPrefixes) {}

TEST(HpackOutputStreamTest, FiveByteIntegersOneToSevenBitPrefixes) {}

TEST(HpackOutputStreamTest, SixByteIntegersOneToSevenBitPrefixes) {}

// Test that encoding an integer with an N-bit prefix preserves the
// upper (8-N) bits of the first byte.
TEST(HpackOutputStreamTest, AppendUint32PreservesUpperBits) {}

TEST(HpackOutputStreamTest, AppendBytes) {}

TEST(HpackOutputStreamTest, BoundedTakeString) {}

TEST(HpackOutputStreamTest, MutableString) {}

}  // namespace

}  // namespace spdy