// Copyright (c) 2019 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/quic/core/qpack/qpack_required_insert_count.h" #include "absl/base/macros.h" #include "quiche/quic/platform/api/quic_test.h" namespace quic { namespace test { namespace { TEST(QpackRequiredInsertCountTest, QpackEncodeRequiredInsertCount) { … } // For testing valid decodings, the Encoded Required Insert Count is calculated // from Required Insert Count, so that there is an expected value to compare // the decoded value against, and so that intricate inequalities can be // documented. struct { … } kTestData[] = …; TEST(QpackRequiredInsertCountTest, QpackDecodeRequiredInsertCount) { … } // Failures are tested with hardcoded values for encoded required insert count, // to provide test coverage for values that would never be produced by a well // behaved encoding function. struct { … } kInvalidTestData[] = …; TEST(QpackRequiredInsertCountTest, DecodeRequiredInsertCountError) { … } } // namespace } // namespace test } // namespace quic