Go to the source code of this file.
◆ DEF_TEST()
Definition at line 202 of file TDPQueueTest.cpp.
202 {
206}
void sort_test(skiatest::Reporter *reporter)
void random_test(skiatest::Reporter *reporter)
static void simple_test(skiatest::Reporter *reporter)
◆ random_test()
Definition at line 82 of file TDPQueueTest.cpp.
82 {
85
86 for (
int i = 0;
i < 100; ++
i) {
87
91 for (
int j = 0; j <
count; ++j) {
98 --j;
99 }
100 }
101
102
104 for (
int j = 0; j <
count; ++j) {
106 }
108 for (
int j = 0; j <
count; ++j) {
109
111 }
112
113
115
117 for (
int k = 0; k <
count; ++k) {
120 }
121
124 case 0: {
129 break;
130 }
131 case 1: {
132 int item;
133 do {
138 break;
139 }
140 case 2: {
141 int item;
142 do {
145 array[item].fPriority = random.
nextS();
147 break;
148 }
149 }
150 }
151 }
152}
#define REPORTER_ASSERT(r, cond,...)
uint32_t nextULessThan(uint32_t count)
void priorityDidChange(T entry)
◆ simple_test()
◆ sort_test()
Definition at line 154 of file TDPQueueTest.cpp.
154 {
156
159
160
170 }
171
172
178 mock->
fValue = testArray[
i].fValue;
180 pqControl.
insert(&controlArray[
i]);
181 }
182
183
185
186
187 int prevPriority = pqTest.
peek()->fPriority;
191 prevPriority = pqTest.
at(
i)->fPriority;
192 }
193
194
199 }
200}