Skip to content

v0.2.0

Compare
Choose a tag to compare
@sunxfancy sunxfancy released this 08 Mar 19:47
· 60 commits to master since this release
5ae88b1

This version added a new feature to support libFuzzer. Now it can define domains and generate structured fuzzing input from it.
An example fuzz test case can be written like that:

FUZZ_TEST_CASE("fuzz_test") {
    LOG("Run fuzz_test");
    FUZZ_FUNC([=](int k, std::string num) {
        int t = atoi(num.c_str());
        LOG("k: {k}, num:{num}, t: {t}", k, num, t);
        REQUIRE(k == t);
    })
        .WithDomains(InRange<int>(0, 10), Arbitrary<std::string>())
        .WithSeeds({{5, "Foo"}, {10, "Bar"}})
        .Run(10);
}