chromium/net/third_party/quiche/src/quiche/quic/core/quic_interval_set_test.cc

// 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/quic_interval_set.h"

#include <stdarg.h>

#include <algorithm>
#include <iostream>
#include <iterator>
#include <limits>
#include <sstream>
#include <string>
#include <vector>

#include "quiche/quic/platform/api/quic_test.h"

namespace quic {
namespace test {
namespace {

ElementsAreArray;

class QuicIntervalSetTest : public QuicTest {};

TEST_F(QuicIntervalSetTest, IsDisjoint) {}

// Base helper method for verifying the contents of an interval set.
// Returns true iff <is> contains <count> intervals whose successive
// endpoints match the sequence of args in <ap>:
static bool VA_Check(const QuicIntervalSet<int>& is, int count, va_list ap) {}

static bool Check(const QuicIntervalSet<int>& is, int count, ...) {}

// Some helper functions for testing Contains and Find, which are logically the
// same.
static void TestContainsAndFind(const QuicIntervalSet<int>& is, int value) {}

static void TestContainsAndFind(const QuicIntervalSet<int>& is, int min,
                                int max) {}

static void TestNotContainsAndFind(const QuicIntervalSet<int>& is, int value) {}

static void TestNotContainsAndFind(const QuicIntervalSet<int>& is, int min,
                                   int max) {}

TEST_F(QuicIntervalSetTest, AddInterval) {}

TEST_F(QuicIntervalSetTest, DecrementIterator) {}

TEST_F(QuicIntervalSetTest, AddOptimizedForAppend) {}

TEST_F(QuicIntervalSetTest, PopFront) {}

TEST_F(QuicIntervalSetTest, TrimLessThan) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetBasic) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetContainsEmpty) {}

TEST_F(QuicIntervalSetTest, Equality) {}

TEST_F(QuicIntervalSetTest, LowerAndUpperBound) {}

TEST_F(QuicIntervalSetTest, SpanningInterval) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetUnion) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersection) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersectionBothEmpty) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersectionEmptyMine) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersectionEmptyTheirs) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersectionTheirsBeforeMine) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersectionMineBeforeTheirs) {}

TEST_F(QuicIntervalSetTest,
       QuicIntervalSetIntersectionTheirsBeforeMineInt64Singletons) {}

TEST_F(QuicIntervalSetTest,
       QuicIntervalSetIntersectionMineBeforeTheirsIntSingletons) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersectionTheirsBetweenMine) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersectionMineBetweenTheirs) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersectionAlternatingIntervals) {}

TEST_F(QuicIntervalSetTest,
       QuicIntervalSetIntersectionAdjacentAlternatingNonIntersectingIntervals) {}

TEST_F(QuicIntervalSetTest,
       QuicIntervalSetIntersectionAlternatingIntersectingIntervals) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersectionIdentical) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersectionSuperset) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersectionSubset) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetIntersectionLargeSet) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetDifference) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetDifferenceSingleBounds) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetDifferenceSingleInterval) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetDifferenceAlternatingIntervals) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetDifferenceEmptyMine) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetDifferenceEmptyTheirs) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetDifferenceTheirsBeforeMine) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetDifferenceMineBeforeTheirs) {}

TEST_F(QuicIntervalSetTest, QuicIntervalSetDifferenceIdentical) {}

TEST_F(QuicIntervalSetTest, EmptyComplement) {}

TEST(QuicIntervalSetMultipleCompactionTest, OuterCovering) {}

TEST(QuicIntervalSetMultipleCompactionTest, InnerCovering) {}

TEST(QuicIntervalSetMultipleCompactionTest, LeftCovering) {}

TEST(QuicIntervalSetMultipleCompactionTest, RightCovering) {}

// Helper method for testing and verifying the results of a one-interval
// completement case.
static bool CheckOneComplement(int add_min, int add_max, int comp_min,
                               int comp_max, int count, ...) {}

TEST_F(QuicIntervalSetTest, SingleIntervalComplement) {}

// Helper method that copies <iset> and takes its complement,
// returning false if Check succeeds.
static bool CheckComplement(const QuicIntervalSet<int>& iset, int comp_min,
                            int comp_max, int count, ...) {}

TEST_F(QuicIntervalSetTest, MultiIntervalComplement) {}

// Verifies ToString, operator<< don't assert.
TEST_F(QuicIntervalSetTest, ToString) {}

TEST_F(QuicIntervalSetTest, ConstructionDiscardsEmptyInterval) {}

TEST_F(QuicIntervalSetTest, Swap) {}

TEST_F(QuicIntervalSetTest, OutputReturnsOstreamRef) {}

struct NotOstreamable {};

TEST_F(QuicIntervalSetTest, IntervalOfTypeWithNoOstreamSupport) {}

class QuicIntervalSetInitTest : public QuicTest {};

TEST_F(QuicIntervalSetInitTest, DirectInit) {}

TEST_F(QuicIntervalSetInitTest, CopyInit) {}

TEST_F(QuicIntervalSetInitTest, AssignIterPair) {}

TEST_F(QuicIntervalSetInitTest, AssignInitList) {}

TEST_F(QuicIntervalSetInitTest, AssignmentInitList) {}

TEST_F(QuicIntervalSetInitTest, BracedInitThenBracedAssign) {}

}  // namespace
}  // namespace test
}  // namespace quic