Skip to content

Commit b1d24d1

Browse files
committed
Reorder the test instructions by number
1 parent c2ccadc commit b1d24d1

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/test/fuzz/prevector.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,6 @@ void test_one_input(const std::vector<uint8_t>& buffer)
193193
case 0:
194194
test.insert(prov.ConsumeIntegralInRange<size_t>(0, test.size()), prov.ConsumeIntegral<int>());
195195
break;
196-
case 15:
197-
test.erase(prov.ConsumeIntegralInRange<size_t>(0, test.size() - 1));
198-
break;
199196
case 1:
200197
test.resize(std::max(0, std::min(30, (int)test.size() + prov.ConsumeIntegralInRange<int>(0, 4) - 2)));
201198
break;
@@ -211,9 +208,6 @@ void test_one_input(const std::vector<uint8_t>& buffer)
211208
case 4:
212209
test.push_back(prov.ConsumeIntegral<int>());
213210
break;
214-
case 16:
215-
test.pop_back();
216-
break;
217211
case 5: {
218212
int values[4];
219213
int num = 1 + prov.ConsumeIntegralInRange<int>(0, 3);
@@ -223,15 +217,21 @@ void test_one_input(const std::vector<uint8_t>& buffer)
223217
test.insert_range(prov.ConsumeIntegralInRange<size_t>(0, test.size()), values, values + num);
224218
break;
225219
}
220+
case 6: {
221+
int num = 1 + prov.ConsumeIntegralInRange<int>(0, 15);
222+
std::vector<int> values(num);
223+
for (auto& v : values) {
224+
v = prov.ConsumeIntegral<int>();
225+
}
226+
test.resize_uninitialized(values);
227+
break;
228+
}
226229
case 7:
227230
test.reserve(prov.ConsumeIntegralInRange<size_t>(0, 32767));
228231
break;
229232
case 8:
230233
test.shrink_to_fit();
231234
break;
232-
case 14:
233-
test.update(prov.ConsumeIntegralInRange<size_t>(0, test.size() - 1), prov.ConsumeIntegral<int>());
234-
break;
235235
case 9:
236236
test.clear();
237237
break;
@@ -247,15 +247,15 @@ void test_one_input(const std::vector<uint8_t>& buffer)
247247
case 13:
248248
test.move();
249249
break;
250-
case 6: {
251-
int num = 1 + prov.ConsumeIntegralInRange<int>(0, 15);
252-
std::vector<int> values(num);
253-
for (auto& v : values) {
254-
v = prov.ConsumeIntegral<int>();
255-
}
256-
test.resize_uninitialized(values);
250+
case 14:
251+
test.update(prov.ConsumeIntegralInRange<size_t>(0, test.size() - 1), prov.ConsumeIntegral<int>());
252+
break;
253+
case 15:
254+
test.erase(prov.ConsumeIntegralInRange<size_t>(0, test.size() - 1));
255+
break;
256+
case 16:
257+
test.pop_back();
257258
break;
258-
}
259259
}
260260
}
261261

0 commit comments

Comments
 (0)