Aller au contenu
Bienvenue sur la nouvelle documentation de CppUtils !

Builder for configuring and registering a randomized fuzz test.

Paramètre templateDescription
IsSkippedIndicates whether the test execution is bypassed.
using CppUtils::UnitTest::TestSuite::FuzzTestBuilder<IsSkipped>::Base = TestBuilderBase<FuzzTestBuilder<IsSkipped>, IsSkipped>;
std::size_t testIterations;

Number of randomized iterations to execute.

std::uint64_t testSeed {Math::DeterministicRandomEngine::defaultSeed};

Deterministic pseudo-random number generator initial seed.

FuzzTestBuilder::FuzzTestBuilder(TestSuite& suite, std::string name, std::size_t iterations, std::uint64_t seed = Math::DeterministicRandomEngine::defaultSeed, std::chrono::seconds timeout = std::chrono::seconds{10}, std::string skipReason = {});
template <bool Condition>
[[nodiscard]] auto FuzzTestBuilder::rebind(std::string message) -> FuzzTestBuilder<Condition>;
auto FuzzTestBuilder::seed(std::uint64_t newSeed) -> FuzzTestBuilder&;

Sets the deterministic initial pseudo-random number generator seed for fuzz reproducibility.

ParamètreDescription
newSeedSeed value.

Retourne : Reference to this builder.

auto FuzzTestBuilder::operator=(auto&& function) -> void;

Registers the fuzz test callback executed for the configured iteration count.

ParamètreDescription
functionInvocable accepting a DeterministicRandomEngine&.