chromium/net/dns/opt_record_rdata_unittest.cc

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

#include "net/dns/opt_record_rdata.h"

#include <algorithm>
#include <memory>
#include <optional>
#include <string_view>
#include <utility>

#include "base/big_endian.h"
#include "net/dns/dns_response.h"
#include "net/dns/dns_test_util.h"
#include "net/test/gtest_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace net {
namespace {

ElementsAreArray;
IsNull;
NotNull;
SizeIs;

std::string_view MakeStringPiece(const uint8_t* data, unsigned size) {}

TEST(OptRecordRdataTest, ParseOptRecord) {}

TEST(OptRecordRdataTest, ParseOptRecordWithShorterSizeThanData) {}

TEST(OptRecordRdataTest, ParseOptRecordWithLongerSizeThanData) {}

TEST(OptRecordRdataTest, CreateEdeOpt) {}

TEST(OptRecordRdataTest, TestEdeInfoCode) {}

// Test that an Opt EDE record is parsed correctly
TEST(OptRecordRdataTest, ParseEdeOptRecords) {}

// Test the Opt equality operator (and its subclasses as well)
TEST(OptRecordRdataTest, OptEquality) {}

// Check that rdata is null if the data section of an EDE record is too small
// (<2 bytes)
TEST(OptRecordRdataTest, EdeRecordTooSmall) {}

// Check that an EDE record with no extra text is parsed correctly.
TEST(OptRecordRdataTest, EdeRecordNoExtraText) {}

// Check that an EDE record with non-UTF-8 fails to parse.
TEST(OptRecordRdataTest, EdeRecordExtraTextNonUTF8) {}

// Check that an EDE record with an unknown info code is parsed correctly.
TEST(OptRecordRdataTest, EdeRecordUnknownInfoCode) {}

TEST(OptRecordRdataTest, CreatePaddingOpt) {}

TEST(OptRecordRdataTest, ParsePaddingOpt) {}

TEST(OptRecordRdataTest, AddOptToOptRecord) {}

// Test the OptRecordRdata equality operator.
// Equality must be order sensitive. If Opts are same but inserted in different
// order, test will fail epically.
TEST(OptRecordRdataTest, EqualityIsOptOrderSensitive) {}

// Test that GetOpts() follows specified order.
// Sort by key, then by insertion order.
TEST(OptRecordRdataTest, TestGetOptsOrder) {}

}  // namespace
}  // namespace net