chromium/third_party/perfetto/src/trace_processor/importers/common/address_range_unittest.cc

/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "src/trace_processor/importers/common/address_range.h"

#include <cstdint>
#include <limits>
#include <utility>
#include <vector>

#include "test/gtest_and_gmock.h"

namespace perfetto {
namespace trace_processor {

// Limited support for abseil in perfetto so we can not use the recommended
// AbslStringify()
inline void PrintTo(const AddressRange& r, std::ostream* os) {}

namespace {

_;
A;
AllOf;
ElementsAre;
Eq;
IsEmpty;
MockFunction;
Ne;
Pair;
Pointee;
SizeIs;

MATCHER_P2(IteratorPointsTo, container, matcher, "") {}

template <typename Value>
auto MapEntry(uint64_t start, uint64_t end, Value value) {}

auto AppendRangesTo(std::vector<AddressRange>& ranges) {}

TEST(AddressRange, EmptyByDefault) {}

TEST(AddressRange, EmptyRangeContainsNothing) {}

TEST(AddressRange, ContainsAddress) {}

TEST(AddressRange, MaxRangeContainsAll) {}

TEST(AddressRange, ContainsRange) {}

TEST(AddressRange, Intersect) {}

TEST(AddressRange, Overlap) {}

TEST(AddressRangeMap, Empty) {}

TEST(AddressRangeMap, EmplaceFailsForOverlaps) {}

TEST(AddressRangeMap, EmplaceSucceedsForNonOverlaps) {}

TEST(AddressRangeMap, EmplaceFailsForEmptyRange) {}

TEST(AddressRangeMap, DeleteOverlapsAndEmplaceFailsForEmptyRange) {}

TEST(AddressRangeMap, FindAddress) {}

TEST(AddressRangeMap, FindRangeThatContains) {}

TEST(AddressRangeMap, TrimOverlapsAndEmplace) {}

TEST(AddressRangeMap, DeleteOverlapsAndEmplace) {}

TEST(AddressRangeMap, ForOverlapsEmptyRangeDoesNothing) {}

TEST(AddressRangeMap, ForOverlaps) {}

TEST(AddressSet, Empty) {}

TEST(AddressSet, EmptyRangesAreNotAdded) {}

TEST(AddressSet, NonOverlapingNonContiguousAreNotMerged) {}

TEST(AddressSet, ContiguousAreMerged) {}

TEST(AddressSet, OverlapsAreMerged) {}

TEST(AddressSet, SpliceRemove) {}

TEST(AddressSet, PartialRemove) {}

TEST(AddressSet, MultipleRemove) {}

TEST(AddressSet, RemoveEmptyRangeDoesNothing) {}

}  // namespace
}  // namespace trace_processor
}  // namespace perfetto