18#include "pw_allocator/test_harness.h"
19#include "pw_fuzzer/fuzztest.h"
21namespace pw::allocator::test {
31fuzzer::Domain<Request> ArbitraryRequest(
size_t max_size);
42template <
size_t kMaxRequests,
size_t kMaxSize>
43auto ArbitraryRequests() {
44 return fuzzer::VectorOf<kMaxRequests>(ArbitraryRequest(kMaxSize));
81template <
size_t kIndex,
typename... Args>
82Request MakeRequest(Args... args) {
83 if constexpr (kIndex == 0) {
84 return AllocationRequest{
static_cast<size_t>(args)...};
86 if constexpr (kIndex == 1) {
87 return DeallocationRequest{
static_cast<size_t>(args)...};
89 if constexpr (kIndex == 2) {
90 return ReallocationRequest{
static_cast<size_t>(args)...};