15 for (
word i = 0;
i < kSize;
i++) {
18 ASSERT(heap.min_heap_size() == kSize);
19 for (
word i = 0;
i < kSize;
i++) {
34 for (
word i = kSize - 1;
i >= 0;
i--) {
37 ASSERT(heap.min_heap_size() == kSize);
38 for (
word i = 0;
i < kSize;
i++) {
53 for (
word i = kSize - 1;
i >= 0;
i--) {
57 ASSERT(heap.min_heap_size() == kSize);
68 for (
word i = 0;
i < kSize;
i++) {
70 if (
i != 0 &&
i != 5 &&
i != (kSize - 1)) {
83 const word kSize = 1024;
87 for (
word i = 0;
i < kSize;
i++) {
91 ASSERT(heap.min_heap_size() == kSize);
93 for (
word i = 0;
i < kSize;
i++) {
103 ASSERT(heap.min_heap_size() == kMinimumSize);
105 for (
word i = 0;
i < kSize;
i++) {
109 for (
word i = 0;
i < kSize;
i++) {
119 ASSERT(heap.min_heap_size() == kMinimumSize);
126 for (
word i = 0;
i < kSize;
i++) {
131 ASSERT(heap.min_heap_size() == kSize);
132 for (
word i = 0;
i < kSize;
i++) {
133 bool was_inserted =
i % 2 == 0;
134 bool increase =
i % 3 == 0;
135 word new_priority =
i + (increase ? 100 : -100);
140 for (
word i = 0;
i < kSize;
i++) {
141 bool increase =
i % 3 == 0;
143 word expected_priority =
i + (increase ? 100 : -100);
152 for (
word i = 0;
i < kSize;
i++) {
153 bool increase =
i % 3 == 0;
155 word expected_priority =
i + (increase ? 100 : -100);
bool RemoveByValue(const V &value)
const Entry & Minimum() const
bool ContainsValue(const V &value)
void Insert(const P &priority, const V &value)
bool InsertOrChangePriority(const P &priority, const V &value)
UNIT_TEST_CASE(PRIORITY_HEAP_WITH_INDEX__INCREASING)