#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/base/priority_queue.h"
#include <cstddef>
#include "base/functional/bind.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
Priority;
constexpr Priority kNumPriorities = …;
constexpr size_t kNumElements = …;
constexpr size_t kNumQueues = …;
constexpr Priority kPriorities[kNumQueues][kNumElements] = …;
constexpr int kFirstMinOrder[kNumQueues][kNumElements] = …;
constexpr int kLastMaxOrderErase[kNumQueues][kNumElements] = …;
constexpr int kFirstMaxOrder[kNumQueues][kNumElements] = …;
constexpr int kLastMinOrder[kNumQueues][kNumElements] = …;
class PriorityQueueTest : public testing::TestWithParam<size_t> { … };
TEST_P(PriorityQueueTest, AddAndClear) { … }
TEST_P(PriorityQueueTest, PointerComparison) { … }
TEST_P(PriorityQueueTest, FirstMinOrder) { … }
TEST_P(PriorityQueueTest, LastMinOrder) { … }
TEST_P(PriorityQueueTest, FirstMaxOrder) { … }
TEST_P(PriorityQueueTest, GetNextTowardsLastMinAndErase) { … }
TEST_P(PriorityQueueTest, GetPreviousTowardsFirstMaxAndErase) { … }
TEST_P(PriorityQueueTest, FirstMaxOrderErase) { … }
TEST_P(PriorityQueueTest, LastMaxOrderErase) { … }
TEST_P(PriorityQueueTest, EraseFromMiddle) { … }
TEST_P(PriorityQueueTest, InsertAtFront) { … }
TEST_P(PriorityQueueTest, FindIf) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}