mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
fuzz: Avoid timeout in bitdeque
This commit is contained in:
parent
6d5790956f
commit
fad1903b8a
1 changed files with 16 additions and 16 deletions
|
@ -53,21 +53,11 @@ FUZZ_TARGET(bitdeque, .init = InitRandData)
|
|||
--initlen;
|
||||
}
|
||||
|
||||
LIMITED_WHILE(provider.remaining_bytes() > 0, 900)
|
||||
const auto iter_limit{maxlen > 6000 ? 90U : 900U};
|
||||
LIMITED_WHILE(provider.remaining_bytes() > 0, iter_limit)
|
||||
{
|
||||
{
|
||||
assert(deq.size() == bitdeq.size());
|
||||
auto it = deq.begin();
|
||||
auto bitit = bitdeq.begin();
|
||||
auto itend = deq.end();
|
||||
while (it != itend) {
|
||||
assert(*it == *bitit);
|
||||
++it;
|
||||
++bitit;
|
||||
}
|
||||
}
|
||||
|
||||
CallOneOf(provider,
|
||||
CallOneOf(
|
||||
provider,
|
||||
[&] {
|
||||
// constructor()
|
||||
deq = std::deque<bool>{};
|
||||
|
@ -535,7 +525,17 @@ FUZZ_TARGET(bitdeque, .init = InitRandData)
|
|||
assert(it == deq.begin() + before);
|
||||
assert(bitit == bitdeq.begin() + before);
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
{
|
||||
assert(deq.size() == bitdeq.size());
|
||||
auto it = deq.begin();
|
||||
auto bitit = bitdeq.begin();
|
||||
auto itend = deq.end();
|
||||
while (it != itend) {
|
||||
assert(*it == *bitit);
|
||||
++it;
|
||||
++bitit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue